function addSearch($name, $field, $type, $value = '', $default = "") { $str = ''; $value = $value ? $value : $default; $str .= ' ' . $name . ' '; switch ($type) { case "array": $str .= '<select name="' . $field . '" id="' . $field . '" class="textbox form-control">'; foreach ($value as $id => $text) { $str .= '<option value="' . $id . '" ' . ($default == $id ? 'selected' : '') . '>' . $text . '</option>'; } $str .= '</select>'; break; case "date": $value = $value ? $value : ($default ? $default : date('d/m/Y')); $value = getValue($field, "str", "GET", $value); $str .= '<input type="text" name="' . $field . '" id="' . $field . '" value="' . $value . '" datepick-element="1" class="form-control">'; break; case "text": $value = getValue($field, "str", "GET", translate_text("Enter keyword")); $str .= '<input type="text" class="form-control" name="' . $field . '" id="' . $field . '" value="' . $value . '">'; break; } $this->arrayAddSearch[] = $str; }
function text_translate($text, $from = 'en', $to = 'en') { include_once dirname(__FILE__) . '/modules/realtimetranslate/translate.php'; return translate_text($text, $from, $to); }
$fs_filepath = "../../../pictures/category/"; $extension_list = "jpg,gif,png,swf"; $limit_size = 300000; #+ $small_width = 125; $small_heght = 97; $small_quantity = 100; #+ $medium_width = 250; $medium_heght = 100; $medium_quantity = 90; //check security... require_once("../../resource/security/security.php"); //Check user login... checkLogged(); //Check access module... if(checkAccessModule($module_id) != 1) redirect($fs_denypath); $array_config = array("image"=>1,"upper"=>1,"order"=>1,"description"=>1); $array_value = array("static" => translate_text("Trang tĩnh"), "nguoimua" => translate_text("Dành cho người mua"), "nguoiban" => translate_text("Dành cho người bán"), "quydinh" => translate_text("Quy định"), "thongbao" => translate_text("Thông báo") ); ?>
function footer($total_list = 0){ $str = '<table cellpadding="5" cellspacing="0" width="100%" class="page"><tr>'; if($this->delete){ $str .= '<td width="150">'; $str .= ' <a href="#" onclick="if (confirm(\'' . str_replace("'","\'",translate_text("Do you want to delete the product you've selected ?")) . '\')){ deleteall(' . $total_list . '); }">' . translate_text("Delete all selected") . '</a>'; $str .= ' <img src="' . $this->image_path . 'delete.gif" border="0" align="absmiddle" />'; $str .= '</td>'; } $str .= '<td width="150">' . translate_text("Total record") . ' : <span id="total_footer">' . $this->total_record . '</span></td>'; $str .= '<td>' . $this->generate_page() . '</td>'; $str .= '</tr></table>'; return $str; }
<? require_once("inc_security.php"); //check quyền them sua xoa checkAddEdit("delete"); $fs_redirect = base64_decode(getValue("url","str","GET",base64_encode("listing.php"))); $record_id = getValue("record_id","int","GET"); $field_id = "cat_id"; //kiểm tra quyền sửa xóa của user xem có được quyền ko checkRowUser($fs_table,$field_id,$record_id,$fs_redirect); //Delete data with ID delete_file($fs_table,$field_id,$record_id,"cat_picture",$fs_filepath); echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">'; echo '<script language="javascript">alert("' . translate_text("You have successfully deleted") . '!");</script>'; redirect($fs_redirect); ?>
$class_menu = new menu(); $listAll = $class_menu->getAllChild("categories_multi", "cat_id", "cat_parent_id", 0, "cat_type='static' AND lang_id = " . $lang_id, "cat_id,cat_name,cat_type", "cat_order ASC,cat_name ASC", "cat_has_child", 0); unset($class_menu); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <?php echo $load_header; ?> </head> <body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <? /*------------------------------------------------------------------------------------------------*/ ?> <?php echo template_top(translate_text("Records Add")); ?> <? /*------------------------------------------------------------------------------------------------*/ ?> <? $form = new form(); $form->create_form("form_name",$fs_action,"post","multipart/form-data",'onsubmit="validateForm();return false;" id="form_name" '); $form->create_table(); ?> <?php echo $form->text_note('Những ô dấu sao (<font class="form_asterisk">*</font>) là bắt buộc phải nhập.'); echo $form->errorMsg($errorMsg); ?> <?php echo $form->select_db_multi("Danh mục", "sta_category_id", "sta_category_id", $listAll, "cat_id", "cat_name", $sta_category_id, "Danh mục", 1, "", 1, 0, "", ""); echo $form->text("Tiêu đề", "sta_title", "sta_title", $sta_title, "Tiêu đề", 1, 250, "", 255, "", "", "");
$sql = " AND mnu_type = '".$mnu_type."'"; $menu = new menu(); $listAll = $menu->getAllChild("menus_multi","mnu_id","mnu_parent_id","0","mnu_id <> ".$record_id.$sql." AND lang_id = " . $_SESSION["lang_id"],"mnu_id,mnu_name,mnu_link,mnu_target,mnu_order,mnu_type,mnu_parent_id,mnu_has_child,mnu_check","mnu_order ASC, mnu_name ASC","mnu_has_child",0); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <?php echo $load_header; ?> </head> <body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <? /*------------------------------------------------------------------------------------------------*/ ?> <?php echo template_top(translate_text("Records Edit")); ?> <? /*------------------------------------------------------------------------------------------------*/ ?> <? $form = new form(); $form->create_form("form_name",$fs_action,"post","multipart/form-data",'onsubmit="validateForm();return false;" id="form_name" '); $form->create_table(); ?> <?php echo $form->text_note('Những ô dấu sao (<font class="form_asterisk">*</font>) là bắt buộc phải nhập.'); echo $form->errorMsg($errorMsg); ?> <?php echo $form->select("Loại trình đơn", "mnu_type", "mnu_type", $arrType, $mnu_type, "", 1, 150, '', ""); echo $form->text("Tên trình đơn", "mnu_name", "mnu_name", $mnu_name, "Tên trình đơn", 1, 250, "", 255);
echo translate_text("Account"); ?> :</td> <td><input type="text" name="username" id="username" /></td> </tr> <tr> <td><?php echo translate_text("Password"); ?> :</td> <td><input type="password" name="password" id="password" /></td> </tr> <tr> <td> </td> <td><input type="submit" class="tootlipObserved" value="<?php echo translate_text("Login"); ?> " /></td> </tr> </table> </form> </td> <td rowspan="2"><img src="resource/images/login_04.gif" width="21" height="150" alt=""></td> </tr> <tr> <td><img src="resource/images/login_05.gif" width="320" height="19" alt="" style="padding-top: 4px;" /></td> </tr> </table> </body> </html>
<? include ("inc_security.php"); $fs_redirect = base64_decode(getValue("returnurl","str","GET",base64_encode("listing.php"))); $record_id = getValue("record_id","int","GET"); $myform = new generate_form(); $idNewRecord = $myform->copyRecord($fs_table,$field_id,$field_name,$record_id,'',"mnu_picture",$fs_filepath); echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">'; if($idNewRecord!=0){ echo '<script language="javascript">alert("' . translate_text("You have successfully duplicated") . '!");</script>'; }else{ echo '<script language="javascript">alert("' . str_replace("'","\'",translate_text("You have not successfully duplicated")) . '!");</script>'; } redirect($fs_redirect); ?>
<? /*------------------------------------------------------------------------------------------------*/ ?> <? $form = new form(); $form->create_form("form_name",$fs_action,"post","multipart/form-data",'onsubmit="validateForm();return false;" id="form_name" '); $form->create_table(); ?> <?php echo $form->text_note('Những ô dấu sao (<font class="form_asterisk">*</font>) là bắt buộc phải nhập.'); echo $form->errorMsg($errorMsg); ?> <?php echo $form->text(translate_text("Đường dẫn"), "seo_link", "seo_link", $seo_link, translate_text("link"), 1, 550, "", 255); echo $form->text(translate_text("Tiêu đề"), "seo_title", "seo_title", $seo_title, translate_text("title"), 1, 250, "", 255); echo $form->textarea(translate_text("Mô tả"), "seo_description", "seo_description", $seo_description, translate_text("description"), 1, 600, 120, "", "", ""); echo $form->textarea(translate_text("Từ khóa"), "seo_keyword", "seo_keyword", $seo_keyword, translate_text("keyword"), 1, 600, 120, "", "", ""); ?> <?php echo $form->radio("Sau khi lưu dữ liệu", "add_new" . $form->ec . "return_listing" . $form->ec . "return_edit", "after_save_data", $add . $form->ec . $listing . $form->ec . $edit, $after_save_data, "Thêm mới" . $form->ec . "Quay về danh sách" . $form->ec . "Sửa bản ghi", 0, "" . $form->ec . "" . $form->ec . ""); echo $form->button("submit" . $form->ec . "reset", "submit" . $form->ec . "reset", "submit" . $form->ec . "reset", "Cập nhật" . $form->ec . "Làm lại", "Cập nhật" . $form->ec . "Làm lại", 'style="background:url(' . $fs_imagepath . 'button_1.gif) no-repeat; border:none;"' . $form->ec . 'style="background:url(' . $fs_imagepath . 'button_2.gif) no-repeat; border:none;"', ""); ?> <br /> <?php echo $form->hidden("action", "action", "submitForm", ""); ?> <? $form->close_table(); $form->close_form(); unset($form); ?>
<? //generate by dinhtoan@finalstyle.com require_once("config_security.php"); //check quyền them sua xoa $returnurl = base64_decode(getValue("returnurl","str","GET",base64_encode("configmodule.php"))); $record_id = getValue("record_id","int","GET",0); //Delete data with ID $db_del = new db_execute("DELETE FROM modules WHERE mod_id =" . $record_id); unset($db_del); echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">'; echo '<script language="javascript">alert("' . translate_text("You_have_successfully_deleted") . '")</script>'; redirect($returnurl); ?>
?> " /> <?php echo $cat["cat_name"]; ?> </li> <? } ?> </ul> </td> </tr> </tbody> <tr valign="baseline"> <td nowrap align="right"> </td> <td> <input type="button" class="bottom" onClick="document.add_user.submit();" value="<?php echo translate_text("Cập nhật"); ?> "> </td> </tr> </table> <input type="hidden" name="Action" value="insert"> </form> <? /*---------Body------------*/ ?> <?php echo template_bottom(); ?> <? /*------------------------------------------------------------------------------------------------*/ ?> </body> <? $db_getallmodule->close();
echo base64_encode($css . '.bak'); ?> '" value="<?php echo translate_text("Restore this file"); ?> " class="form"></td> </tr> </table> </form> <? }else{ ?> <table cellpadding="5" cellspacing="0" width="100%" class="table" bordercolor="#90B0E1" border="1"> <tr bgcolor="#f2f2f2"> <td class="bold"><?php echo translate_text("CSS Document name"); ?> </td> <td class="bold" width="20"><img src="<?php echo $fs_imagepath; ?> edit.png" border="0" /></td> </tr> <? foreach(glob($cssPath . "*.css") as $name){ $name = end(explode("/",$name)); ?> <tr> <td><a href="editcss.php?css=<?php echo base64_encode($name); ?>
$load_header .= '<script src="../../resource/js/library.js" type="text/javascript"></script>'; //phan ngon ngu admin $db_language = new db_query("SELECT tra_text,tra_keyword FROM admin_translate"); $langAdmin = array(); while($row=mysql_fetch_assoc($db_language->result)){ $langAdmin[$row["tra_keyword"]] = $row["tra_text"]; } //cau hinh $db_con = new db_query("SELECT con_currency,con_exchange from configuration WHERE con_lang_id=" . $lang_id); if ($row=mysql_fetch_array($db_con->result)){ while (list($data_field, $data_value) = each($row)) { if (!is_int($data_field)){ //tao ra cac bien config $$data_field = $data_value; //echo $data_field . "= $data_value <br>"; } } } $db_con->close(); unset($db_con); //cau hinh category $array_value = array( "static" => translate_text("Trang tĩnh"), "huong-dan" => translate_text("Hướng dẫn"), "tap-chi" => translate_text("Tạp chí"), "tuyen-dung" => translate_text("Tuyển dụng") ); ?>
<? include ("inc_security.php"); $fs_redirect = base64_decode(getValue("url","str","GET",base64_encode("listing.php"))); $record_id = getValue("record_id","int","GET"); $myform = new generate_form(); $idNewRecord = $myform->copyRecord($fs_table,$field_id,$field_name,$record_id); echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">'; if($idNewRecord!=0){ echo '<script language="javascript">alert("' . translate_text("Bạn đã nhân bản bản ghi thành công") . '!");</script>'; }else{ echo '<script language="javascript">alert("' . str_replace("'","\'",translate_text("Nhân bản không thành công")) . '!");</script>'; } redirect($fs_redirect); ?>
$('#cat_parent_id').children('[data-type!='+cat_type+']').appendTo('#hidden'); }); $('#cat_parent_id').change(function(e) { type = $('option:selected', this).attr('data-type'); $('#cat_type').children('[value^='+type+']').attr('selected','selected'); }).trigger('change'); }); </script> </td> </tr> <?php echo $form->text(translate_text("name"), "cat_name", "cat_name", $cat_name, translate_text("name"), 1, 250, "", 255); echo $form->text(translate_text("link"), "cat_link", "cat_link", $cat_link, translate_text("link"), 0, 300, "", 255); ?> <? if($array_config["order"]==1) echo $form->text(translate_text("order"),"cat_order","cat_order",$cat_order,translate_text("order"),1,50,"",255); if($array_config["image"]==1) echo $form->getFile(translate_text("image"), "picture", "picture", translate_text("image"), 0, 32, "", '(Dung lượng tối đa <font color="#FF0000">' . $limit_size . ' Kb</font>)'); if($array_config["description"]==1) echo $form->textarea(translate_text("description"), "cat_description", "cat_description", $cat_description, translate_text("description"), 1, 600, 120, "", "", ""); // if($array_config["upper"]==1) echo $form->select_db_multi(translate_text("upper"), "cat_parent_id", "cat_parent_id", $listAll, "cat_id", "cat_name", $cat_parent_id, translate_text("upper"), "1", "200"); ?> <?php echo $form->radio("Sau khi lưu dữ liệu", "add_new" . $form->ec . "return_listing" . $form->ec . "return_edit", "after_save_data", $add . $form->ec . $listing . $form->ec . $edit, $after_save_data, "Thêm mới" . $form->ec . "Quay về danh sách" . $form->ec . "Sửa bản ghi", 0, "" . $form->ec . "" . $form->ec . ""); echo $form->button("submit" . $form->ec . "reset", "submit" . $form->ec . "reset", "submit" . $form->ec . "reset", "Cập nhật" . $form->ec . "Làm lại", "Cập nhật" . $form->ec . "Làm lại", 'style="background:url(' . $fs_imagepath . 'button_1.gif) no-repeat; border:none;"' . $form->ec . 'style="background:url(' . $fs_imagepath . 'button_2.gif) no-repeat; border:none;"', ""); ?> <br /> <?php echo $form->hidden("action", "action", "submitForm", "");
" onclick="showhidden(<?php echo $i; ?> );" title="<?php echo translate_text("Xem danh sách"); ?> " /></td> <td class="t"><span style="cursor:pointer; font-weight: bold; color: #1D5994;" onclick="showhidden(<?php echo $i; ?> );"><?php echo $row["mod_name"]; ?> </span></td> <td width="10"><img src="resource/images/arrow.png" title="<?php echo translate_text("Move"); ?> " class="handle" /></td> </tr> <tbody id="showmneu_<?php echo $i; ?> " bgcolor="#FFFFFF" style="display:none"> <? //$id_tab = $row["mod_id"]; $title_tab = $row["mod_name"]; $arraySub = explode("|",$row["mod_listname"]); $arrayUrl = explode("|",$row["mod_listfile"]); foreach($arraySub as $key=>$value){ $url = isset($arrayUrl[$key]) ? $arrayUrl[$key] : '#';
$load_header .= '<script language="javascript" src="../../resource/js/tooltip.jquery.js"></script>'; $load_header .= '<script language="javascript" src="../../resource/js/jquery.jeditable.mini.js"></script>'; $load_header .= '<script language="javascript" src="../../resource/js/swfObject.js"></script>'; $load_header .= '<script language="javascript" src="../../resource/js/jwysiwyg/jquery.wysiwyg.js"></script>'; $fs_change_bg = 'onMouseOver="this.style.background=\'#DDF8CC\'" onMouseOut="this.style.background=\'#FEFEFE\'"'; //phan ngon ngu admin $db_language = new db_query("SELECT tra_text,tra_keyword FROM admin_translate"); $langAdmin = array(); while($row=mysql_fetch_assoc($db_language->result)){ $langAdmin[$row["tra_keyword"]] = $row["tra_text"]; } $db_con = new db_query("SELECT con_currency,con_exchange from configuration WHERE con_lang_id=" . $lang_id); if ($row=mysql_fetch_array($db_con->result)){ while (list($data_field, $data_value) = each($row)) { if (!is_int($data_field)){ //tao ra cac bien config $$data_field = $data_value; //echo $data_field . "= $data_value <br>"; } } } $db_con->close(); unset($db_con); $array_value = array( "nguoimua"=>translate_text("Dành cho người mua") ,"nguoiban"=>translate_text("Dành cho người bán") ,"quydinh"=>translate_text("Quy định") ); ?>
?> "><img border="0" src="<?php echo $fs_imagepath; ?> check_<?php echo $row["mnu_active"]; ?> .gif" title="Active!"/></a></td> <td align="center" width="16"><img src="<?php echo $fs_imagepath; ?> copy.gif" title="<?php echo translate_text("Are you want duplicate record"); ?> " border="0" onclick="if (confirm('<?php echo translate_text("Are you want duplicate record"); ?> ?')){ window.location.href='copy.php?record_id=<?php echo $row["mnu_id"]; ?> &returnurl=<?php echo base64_encode(getURL()); ?> '}" style="cursor:pointer"/></td> <td align="center" width="16"><a class="text" href="edit.php?record_id=<?php echo $row["mnu_id"]; ?> &returnurl=<?php echo base64_encode(getURL()); ?> "><img src="<?php
/** * generate machine translation of content * @param $pageContent * @param $pageInfo * @param $targetLang * @return string */ function generate_machine_translated_content($pageContent, $pageInfo, $targetLang) { make_sure_machine_translation_is_enabled(); $sourceLang = $pageInfo['lang']; return translate_text($pageContent, $sourceLang, $targetLang, true); }
</tr> </table> <script language="javascript"> function formchangepass(){ if(document.getElementById("adm_password").value==''){ document.getElementById("adm_password").focus(); alert("<?php echo translate_text("Please enter new password"); ?> "); return false; } if(document.getElementById("adm_password").value!=document.getElementById("adm_password_con").value){ document.getElementById("adm_password_con").focus(); alert("<?php echo translate_text("New password and confirm password is not correct"); ?> "); return false; } document.edit_password.submit(); } </script> <?php echo template_bottom(); ?> </body> <? $db_admin_sel->close(); unset($db_admin_sel); ?>
check_<?php echo $row["adm_active"]; ?> .gif" alt="Active!"></a></td> <td align="center"><a href="edit.php?iAdm=<?php echo $row["adm_id"]; ?> "><img src="<?php echo $fs_imagepath; ?> edit.png" alt="EDIT" border="0"></a></td> <td align="center"><img src="<?php echo $fs_imagepath; ?> delete.png" border="0" onClick="if (confirm('<?php echo translate_text("Are you sure to delete"); ?> ?')){ window.location.href='active.php?record_id=<?php echo $row["adm_id"]; ?> &type=adm_delete&value=<?php echo abs($row["adm_delete"] - 1); ?> &url=<?php echo base64_encode(getURL()); ?> '}" style="cursor:pointer"></td> </tr> <? } ?> </table> <? /*---------Body------------*/ ?>
<?php echo $form->text_note('Những ô dấu sao (<font class="form_asterisk">*</font>) là bắt buộc phải nhập.'); echo $form->errorMsg($errorMsg); ?> <?php echo $form->select("Loại trình đơn", "mnu_type", "mnu_type", $arrType, $mnu_type, "", 1, 150, '', ""); echo $form->text("Tên trình đơn", "mnu_name", "mnu_name", $mnu_name, "Tên trình đơn", 1, 250, "", 255); echo $form->text("Liên kết", "mnu_link", "mnu_link", $mnu_link, "Liên kết", 1, 250, "", 255); echo $form->text("Màu nền ", "mnu_background", "mnu_background", $mnu_background, "Background", 1, 250, "", 255); ?> <? if($array_config["order"]==1) echo $form->text("Thứ tự","mnu_order","mnu_order",$mnu_order,"Thứ tự",1,50,"",255); if($array_config["image"]==1) echo $form->getFile("Ảnh minh họa", "mnu_picture", "mnu_picture", "Ảnh minh họa", 0, 32, "", '(Dung lượng tối đa <font color="#FF0000">' . $limit_size . ' Kb</font>)'); if($array_config["upper"]==1) echo $form->select_db_multi("Menu cấp trên", "mnu_parent_id", "mnu_parent_id", $listAll, "mnu_id", "mnu_name", $mnu_parent_id, "Menu cấp trên", "0", "200"); if($array_config["description"]==1) echo $form->textarea(translate_text("description"), "mnu_description", "mnu_description", $mnu_description, translate_text("description"), 1, 600, 120, "", "", ""); ?> <?php echo $form->close_table(); echo $form->wysiwyg("Danh sách link", "mnu_data", "", "../../resource/ckeditor/", "99%", 300); echo $form->create_table(); echo $form->select("Mở ra", "mnu_target", "mnu_target", $arrTarget, $mnu_target, "", 1, 150, '', ""); ?> <?php echo $form->radio("Sau khi lưu dữ liệu", "add_new" . $form->ec . "return_listing" . $form->ec . "return_edit", "after_save_data", $add . $form->ec . $listing . $form->ec . $edit, $after_save_data, "Thêm mới" . $form->ec . "Quay về danh sách" . $form->ec . "Sửa bản ghi", 0, "" . $form->ec . "" . $form->ec . ""); echo $form->button("submit" . $form->ec . "reset", "submit" . $form->ec . "reset", "submit" . $form->ec . "reset", "Cập nhật" . $form->ec . "Làm lại", "Cập nhật" . $form->ec . "Làm lại", 'style="background:url(' . $fs_imagepath . 'button_1.gif) no-repeat; border:none;"' . $form->ec . 'style="background:url(' . $fs_imagepath . 'button_2.gif) no-repeat; border:none;"', ""); ?> <br /> <?php echo $form->hidden("action", "action", "submitForm", "");
<? } ?> </td> </tr> <? } ?> <tr> <td> </td> <td> <input type="button" class="bottom" value="<?php echo translate_text("Cập nhật"); ?> " style="cursor:hand; width:100px" onClick="validateForm();"> <input type="reset" class="bottom" value="<?php echo translate_text("Làm lại"); ?> " style="cursor:hand; width:100px"> <input type="hidden" name="action" value="update"> </td> </tr> </table> <? /*---------------------------------*/ ?> </form> <?php echo template_bottom(); ?> </body> </html>
<? require_once("inc_security.php"); //check quyền them sua xoa checkAddEdit("delete"); $fs_redirect = base64_decode(getValue("returnurl","str","GET",base64_encode("listing.php"))); $record_id = getValue("record_id","int","GET"); $field_id = "cat_id"; //kiểm tra quyền sửa xóa của user xem có được quyền ko checkRowUser($fs_table,$field_id,$record_id,$fs_redirect); //kiểm tra xóa hết cấp con chưa mới có thể xóa cấp cha $db_select = new db_query("SELECT cat_id FROM " . $fs_table . " WHERE cat_parent_id =" . $record_id); if($row=mysql_fetch_assoc($db_select->result)){ echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">'; echo '<script language="javascript">alert("' . translate_text("You must delete all the levels of this category") . '!");</script>'; redirect($fs_redirect); exit(); } //Delete data with ID delete_file($fs_table,"cat_id",$record_id,"cat_picture",$fs_filepath); $db_del = new db_execute("DELETE FROM ". $fs_table ." WHERE cat_id =" . $record_id); unset($db_del); $db_del = new db_execute("DELETE FROM admin_user_category WHERE auc_category_id =" . $record_id); unset($db_del); redirect($fs_redirect); ?>
function text_translate($text, $from = 'en', $to = 'en') { include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'realtimetranslate' . DIRECTORY_SEPARATOR . 'translate.php'; return translate_text($text, $from, $to); }
?> </span> | <span class="m" data-tab-id="-1"><a href="resource/profile/myprofile.php" onclick="return false"><?php echo translate_text("Thông tin tài khoản"); ?> </a></span> | <? //kiem tra xem neu la o tren localhost thi moi co quyen cau hinh $url = $_SERVER['SERVER_NAME']; if($isAdmin==1 && ($url == "localhost" || strpos($url,"192.168.1")!==false)){ ?> <span class="m" data-tab-id="-2"><a href="resource/configadmin/configmodule.php" onclick="return false"><?php echo translate_text("Cấu hình website"); ?> </a></span> | <? } ?> <img border="0" align="absmiddle" width="20" height="20" src="resource/images/logoff.gif" /> <a href="resource/logout.php"><?php echo translate_text("Thoát"); ?> </a> </td> <td> </td> </tr> </table> </div>