[ Index ] |
|
Code source de e107 0.7.8 |
1 if(ADMIN && getperms("0")) 2 { 3 global $sql,$pst,$ns,$tp,$e_wysiwyg,$pref; 4 if(isset($pst) && $pst->form && $pst->page){ 5 $thispage = urlencode(e_SELF."?".e_QUERY); 6 if(is_array($pst->page)){ 7 for ($i=0; $i<count($pst->page); $i++) { 8 if (strpos($thispage, urlencode($pst->page[$i])) !== FALSE){ 9 $query = urlencode($pst->page[$i]); 10 $theform = $pst->form[$i]; 11 $pid = $i; 12 } 13 } 14 }else{ 15 $query = urlencode($pst->page); 16 $theform = $pst->form; 17 $pid = 0; 18 } 19 20 $existing = is_array($pst->id) ? $pst->id[$pid] : $pst->id; 21 $trigger = ($e_wysiwyg && $pref['wysiwyg']) ? "tinyMCE.triggerSave();" : ""; 22 23 24 if (strpos($thispage, $query) !== FALSE) { 25 $pst_text = " 26 <form method='post' action='".e_SELF."?clr_preset' id='e_preset' > 27 <div style='text-align:center'>"; 28 if(!$sql->db_Count("preset", "(*)", " WHERE preset_name='".$tp -> toDB($existing, true)."' ")){ 29 $pst_text .= "<input type='button' class='button' name='save_preset' value='".LAN_SAVE."' onclick=\"$trigger savepreset('".$theform."',$pid)\" />"; 30 }else{ 31 $pst_text .= "<input type='button' class='button' name='save_preset' value='".LAN_UPDATE."' onclick=\"$trigger savepreset('".$theform."',$pid)\" />"; 32 $pst_text .= "<input type='hidden' name='del_id' value='$pid' /> 33 <input type='submit' class='button' name='delete_preset' value='".LAN_DELETE."' onclick=\"return jsconfirm('".$tp->toJS(LAN_PRESET_CONFIRMDEL." [".$existing."]")."')\" />"; 34 } 35 $pst_text .= "</div></form>"; 36 return $ns -> tablerender(LAN_PRESET, $pst_text, '', TRUE); 37 } 38 } 39 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 01:23:32 2007 | par Balluche grâce à PHPXref 0.7 |