Beispiel #1
0
 function do_add_menu()
 {
     global $ttH;
     $include_js = $ttH->func->include_js($ttH->dir_temp . 'js/' . $this->modules . '/' . $this->modules . '.js');
     $cur_group = isset($ttH->input['group_id']) ? $ttH->input['group_id'] : 'menu_header';
     $temp = 'menu_add';
     $name_action = isset($ttH->get['name_action']) ? $ttH->get['name_action'] : '';
     $link_action = $ttH->admin->get_link_admin_popup('layout', 'menu', 'add_menu', array("name_action" => $name_action));
     $arr_name_action = explode(',', $name_action);
     $data = array();
     $arr_isset = array('group_id', 'parent_id', 'link_type', 'target');
     foreach ($arr_isset as $tmp) {
         $data[$tmp] = isset($data[$tmp]) ? $data[$tmp] : '';
     }
     $data['include_js'] = $include_js;
     $data["name_action"] = $name_action;
     $data["link_action"] = $link_action;
     //$data["list_group"] = list_group ("group_id", $cur_group, " class=\"form-control\" onchange=\"window.location.href='".$data["link_action"]."&group_id='+this.value;\"");
     $data["list_group"] = list_group("group_id", $cur_group, " class=\"form-control\" id=\"menu_group_id\" data-menu_list=\"menu_parent_id\"");
     //$data['group_name'] = $ttH->data["menu_group"][$cur_group];
     $data["list_menu"] = list_menu($cur_group, "parent_id", $data['parent_id'], " class=\"form-control\" id=\"menu_parent_id\"", array("title" => $ttH->lang['global']['select_title']));
     $ttH->temp_act->assign('data', $data);
     $ttH->temp_act->parse($temp);
     return $ttH->temp_act->text($temp);
 }
Beispiel #2
0
    function get_formulaire_Menu($Menu = array())
    {
        extract(stripslashes_r($Menu));
        if (isset($Menu_Module)) {
            set_values_db('Caranille_Menus', 'Menu_Link', list_menu($Menu_Module));
        }
        ?>
				<form method="POST" action="<?php 
        echo get_link("Menus", "Admin");
        ?>
">
				    <h2><?php 
        echo request_confirm('Add') ? 'Ajout' : 'Modification';
        ?>
 du Menu</h2>
    				<?php 
        echo forumulaire_db('Caranille_Menus', $Menu);
        ?>
    			    <br/>
    				<input type="submit" name="Back" value="Annuler" />
    		    	<input type="submit" name="End_<?php 
        echo request_confirm('Add') ? 'Add' : 'Edit';
        ?>
" value="Terminer"/>
    				<?php 
        if (request_confirm('Second_Edit')) {
            ?>
<input type="submit" name="Second_Delete" value="Supprimer"><?php 
        }
        ?>
    		    </form>
<?php 
    }
 function do_edit()
 {
     global $ttH;
     $err = "";
     $menu_id = $ttH->input["id"];
     if (isset($ttH->post['do_submit'])) {
         /*print_arr($ttH->post);
         		die();*/
         $name_action = $ttH->func->get_friendly_link($ttH->post["name_action"]);
         if (empty($err) && empty($ttH->post["title"])) {
             $err = $ttH->html->html_alert($ttH->lang["global"]["err_invalid_title"], "error");
         }
         if (empty($err)) {
             $col = array();
             $col["menu_nav"] = get_menu_nav($ttH->post["parent_id"], $menu_id);
             $col["menu_level"] = substr_count($col['menu_nav'], ',') + 1;
             $col["parent_id"] = $ttH->post["parent_id"];
             $col["name_action"] = $name_action;
             $col["target"] = $ttH->post["target"];
             $col["show_mod"] = isset($ttH->post["show_mod"]) ? get_input_show($ttH->post["show_mod"]) : "";
             $col["show_act"] = isset($ttH->post["show_act"]) ? get_input_show($ttH->post["show_act"]) : "";
             $col["date_update"] = time();
             $ok = $ttH->db->do_update("menu", $col, " menu_id='" . $menu_id . "'");
             if ($ok) {
                 $col_l = array();
                 $col_l["menu_id"] = $menu_id;
                 $col_l["title"] = $ttH->post["title"];
                 $col_l["link_type"] = $ttH->post["link_type"];
                 $col_l["link"] = $ttH->post["link"];
                 $ttH->db->do_update("menu_lang", $col_l, " menu_id='" . $menu_id . "' and lang='" . $ttH->conf["lang_cur"] . "'");
                 built_menu_nav_sub($menu_id, $col["menu_nav"]);
                 $err = $ttH->html->html_alert($ttH->lang["global"]["edit_success"], "success");
             } else {
                 $err = $ttH->html->html_alert($ttH->lang["global"]["edit_false"], "error");
             }
         }
     }
     $sql = "select * from menu a, menu_lang al \n\t\t\t\t\t\twhere a.menu_id=al.menu_id \n\t\t\t\t\t\tand lang='" . $ttH->conf['lang_cur'] . "' \n\t\t\t\t\t\tand a.menu_id=" . $menu_id;
     $result = $ttH->db->query($sql);
     if ($data = $ttH->db->fetch_row($result)) {
     }
     $data["err"] = $err;
     $data["link_action"] = $ttH->admin->get_link_admin($this->modules, $this->action, $this->sub, array("id" => $menu_id));
     $data["list_group"] = list_group("group_id", $data["group_id"], " class=\"form-control\" onchange=\"window.location.href='" . $data["link_action"] . "&group_id='+this.value;\"");
     //$data['group_name'] = $ttH->data["menu_group"][$this->cur_group];
     $data["list_menu"] = list_menu($this->cur_group, "parent_id", $data["parent_id"], " class=\"form-control\"", array("title" => $ttH->lang['global']['select_title'], 'disabled' => $data["menu_id"]));
     $data["list_link_type"] = $ttH->admin->list_link_type("link_type", $data["link_type"], " class=\"form-control\"");
     $data["list_target"] = $ttH->admin->list_target("target", $data["target"], " class=\"form-control\"");
     $data["list_module"] = list_module("show_mod[]", $data["show_mod"], " class=\"form-control\"", array('title' => $ttH->lang["global"]["select_all"]));
     $ttH->temp_act->assign('data', $data);
     $ttH->temp_act->parse("edit");
     return $ttH->temp_act->text("edit");
 }
Beispiel #4
0
		<td><a href="Javascript:ShowTR(img<?php 
        echo $m;
        ?>
,OpenRep<?php 
        echo $m;
        ?>
)"><img src="../Images/jia.gif" alt="展开" name="img<?php 
        echo $m;
        ?>
" width="32" height="14" border="0" id="img<?php 
        echo $m;
        ?>
"><?php 
        echo $rows[1];
        ?>
</a>------------------<a href="edit_depart.php?id=<?php 
        echo $rows[0];
        ?>
">修改</a>||删除</td>
	</tr>
<?php 
        //输出同级部门
        list_menu($rows[0], $wid, $m);
        $m += 1;
    }
}
?>
</table>
</td></tr></table>
</body>
</html>
 function do_add_menu()
 {
     global $ttH;
     $cur_group = isset($ttH->input['group_id']) ? $ttH->input['group_id'] : 'menu_header';
     $temp = 'menu_add';
     $name_action = isset($ttH->get['name_action']) ? $ttH->get['name_action'] : '';
     $link_action = $ttH->admin->get_link_admin_popup('layout', 'menu', 'add_menu', array("name_action" => $name_action));
     $tmp = explode('-', $name_action);
     $table = $tmp[1] != 'item' ? $tmp[0] . '_' . $tmp[1] : $tmp[0];
     $table_key = $tmp[1] . '_id';
     $table_id = $tmp[2];
     $sql = "select * from " . $table . " a, " . $table . "_lang al \r\r\n\t\t\t\t\t\twhere a." . $table_key . "=al." . $table_key . " \r\r\n\t\t\t\t\t\tand lang='" . $ttH->conf['lang_cur'] . "' \r\r\n\t\t\t\t\t\tand a." . $table_key . "='" . $table_id . "'";
     $result = $ttH->db->query($sql);
     if ($table_info = $ttH->db->fetch_row($result)) {
     }
     $data = array();
     $err = "";
     if (isset($ttH->post['do_submit'])) {
         /*print_arr($ttH->post);
         		die();*/
         $name_action = $ttH->func->get_friendly_link($ttH->post["name_action"]);
         if (empty($ttH->post["title"])) {
             $err = $ttH->html->html_alert($ttH->lang["global"]["err_invalid_title"], "error");
         }
         if (empty($err)) {
             $col = array();
             $col["group_id"] = $cur_group;
             $col["parent_id"] = $ttH->post["parent_id"];
             $col["name_action"] = $name_action;
             $col["target"] = $ttH->post["target"];
             $col["show_mod"] = isset($ttH->post["show_mod"]) ? get_input_show($ttH->post["show_mod"]) : "";
             $col["show_act"] = isset($ttH->post["show_act"]) ? get_input_show($ttH->post["show_act"]) : "";
             $col["show_order"] = 0;
             $col["is_show"] = 1;
             $col["date_create"] = time();
             $col["date_update"] = time();
             $ok = $ttH->db->do_insert("menu", $col);
             if ($ok) {
                 $menu_id = $ttH->db->insertid();
                 $col_l = array();
                 $col_l["menu_id"] = $menu_id;
                 $col_l["title"] = $ttH->post["title"];
                 $col_l["link_type"] = $ttH->post["link_type"];
                 $col_l["link"] = $ttH->post["link"];
                 foreach ($ttH->data["lang"] as $lang_id => $lang_row) {
                     $col_l["lang"] = $lang_row["name"];
                     $ttH->db->do_insert("menu_lang", $col_l);
                 }
                 //update group_nav
                 $col = array();
                 $col["menu_nav"] = get_menu_nav($ttH->post["parent_id"], $menu_id);
                 $col["menu_level"] = substr_count($col['menu_nav'], ',') + 1;
                 $ok = $ttH->db->do_update("menu", $col, " menu_id='" . $menu_id . "'");
                 if ($ok) {
                     built_menu_nav_sub($menu_id, $col["menu_nav"]);
                 }
                 $data = array();
                 $err = $ttH->html->html_alert($ttH->lang["global"]["add_success"], "success");
             } else {
                 $data = $ttH->post;
                 $err = $ttH->html->html_alert($ttH->lang["global"]["add_false"], "error");
             }
         } else {
             $data = $ttH->post;
         }
     }
     $data["err"] = $err;
     $arr_isset = array('group_id', 'parent_id', 'link_type', 'target');
     foreach ($arr_isset as $tmp) {
         $data[$tmp] = isset($data[$tmp]) ? $data[$tmp] : '';
     }
     $data['show_mod'] = isset($data['show_mod']) ? @implode(',', $data['show_mod']) : '';
     $data['name_action'] = $name_action;
     $data['title'] = isset($data['title']) ? $data['title'] : $table_info['title'];
     $data['link'] = isset($data['link']) ? $data['link'] : $table_info['friendly_link'];
     $data["link_action"] = $link_action;
     $data["list_group"] = list_group("group_id", $cur_group, " class=\"form-control\" onchange=\"window.location.href='" . $data["link_action"] . "&group_id='+this.value;\"");
     //$data['group_name'] = $ttH->data["menu_group"][$cur_group];
     $data["list_menu"] = list_menu($cur_group, "parent_id", $data['parent_id'], " class=\"form-control\"", array("title" => $ttH->lang['global']['select_title']));
     $data["list_link_type"] = $ttH->admin->list_link_type("link_type", $data['link_type'], " class=\"form-control\"");
     $data["list_target"] = $ttH->admin->list_target("target", $data['target'], " class=\"form-control\"");
     $data["list_module"] = list_module("show_mod[]", $data['show_mod'], " class=\"form-control\"", array('title' => $ttH->lang["global"]["select_all"]));
     $ttH->temp_act->assign('data', $data);
     $ttH->temp_act->parse($temp);
     return $ttH->temp_act->text($temp);
 }
Beispiel #6
0
function list_menu($num, $wid, &$m)
{
    $conn = mysql_connect("localhost", "root", "root");
    mysql_select_db("db_office", $conn);
    mysql_query("set names gb2312");
    //查询同级部门语句
    $sqlstr = "select * from tb_depart where up_depart = " . $num;
    $result = mysql_query($sqlstr, $conn);
    ?>
<!--隐藏域-->
<tr id="OpenRep<?php 
    echo $m;
    ?>
" style="display:none;">
	<td>				
		<table width="<?php 
    echo $wid;
    ?>
%"  border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td height="25" align="center">
					<table width="<?php 
    echo $wid - 3;
    ?>
%"  border="0" cellspacing="0" cellpadding="0">
<?php 
    //循环输出同级部门
    while ($rows = mysql_fetch_row($result)) {
        //查看下属部门
        $sqlstr1 = "select * from tb_depart where up_depart = " . $rows[0];
        $result1 = mysql_query($sqlstr1, $conn);
        $nu = mysql_num_rows($result1);
        //如果当前部门没有下属部门时
        if (!$nu) {
            $m += 1;
            ?>
						 <tr onMouseOver="this.style.background='#96F7F4'" onMouseOut="this.style.background=''">
                    		<td width="100%" align="left">&nbsp;&nbsp;&nbsp;<img src="../images/folder.gif" width="30" height="16" border="0"><?php 
            echo $rows[1];
            ?>
------------------<a href="edit_depart.php?id=<?php 
            echo $rows[0];
            ?>
">修改</a>||<a href="del_depart_chk.php?id=<?php 
            echo $rows[0];
            ?>
" onClick="return cfm();">删除</a></td>
                  		</tr>
									
<?php 
        } else {
            $m += 1;
            ?>
						<tr onMouseOver="this.style.background='#96F7F4'" onMouseOut="this.style.background=''">
							<td>&nbsp;<a href="Javascript:ShowTR(img<?php 
            echo $m;
            ?>
,OpenRep<?php 
            echo $m;
            ?>
)"><img src="../Images/jia.gif" alt="展开" name="img<?php 
            echo $m;
            ?>
" width="32" height="14" border="0" id="img<?php 
            echo $m;
            ?>
"><?php 
            echo $rows[1];
            ?>
</a>------------------<a href="edit_depart.php?id=<?php 
            echo $rows[0];
            ?>
">修改</a>||删除</td>
						</tr>
<?php 
            list_menu($rows[0], $wid, $m);
        }
    }
    ?>
              		 </table>
				</td>
           	</tr>
         </table>
	</td>
</tr>
<?php 
}
Beispiel #7
0
 function do_manage($is_show = "")
 {
     global $ttH;
     $err = "";
     //update
     if (isset($ttH->input['do_action'])) {
         $up_id = isset($ttH->input["selected_id"]) ? $ttH->input["selected_id"] : array();
         switch ($ttH->input["do_action"]) {
             case "do_edit":
                 $arr_show_order = isset($ttH->post["show_order"]) ? $ttH->post["show_order"] : array();
                 $arr_auto_sub = isset($ttH->post["auto_sub"]) ? $ttH->post["auto_sub"] : array();
                 $arr_lock_title = isset($ttH->post["lock_title"]) ? $ttH->post["lock_title"] : array();
                 $mess = $ttH->lang['global']['edit_success'] . " ID: <strong>";
                 $str_mess = "";
                 for ($i = 0; $i < count($up_id); $i++) {
                     $dup = array();
                     $dup['show_order'] = $arr_show_order[$up_id[$i]];
                     $dup['auto_sub'] = $arr_auto_sub[$up_id[$i]];
                     $dup['lock_title'] = isset($arr_lock_title[$up_id[$i]]) ? $arr_lock_title[$up_id[$i]] : 0;
                     $ok = $ttH->db->do_update("menu", $dup, "menu_id=" . $up_id[$i]);
                     if ($ok) {
                         $str_mess .= $str_mess ? ", " : "";
                         $str_mess .= $up_id[$i];
                     } else {
                         $mess .= $ttH->lang["global"]['edit_false'] . " ID: <strong>" . $up_id[$i] . "</strong>";
                     }
                 }
                 $mess .= $str_mess . "</strong>";
                 $err = $ttH->html->html_alert($mess, "success");
                 break;
             case "do_restore":
                 $up_id = isset($ttH->input["id"]) ? array($ttH->input["id"]) : $up_id;
                 $mess = $ttH->lang['global']['restore_success'] . " ID: <strong>";
                 $str_mess = "";
                 for ($i = 0; $i < count($up_id); $i++) {
                     $dup = array();
                     $dup['is_show'] = 1;
                     $ok = $ttH->db->do_update("menu", $dup, "menu_id=" . $up_id[$i]);
                     if ($ok) {
                         $str_mess .= $str_mess ? ", " : "";
                         $str_mess .= $up_id[$i];
                     } else {
                         $mess .= $ttH->lang["global"]['restore_false'] . " ID: <strong>" . $up_id[$i] . "</strong>";
                     }
                 }
                 $mess .= $str_mess . "</strong>";
                 $err = $ttH->html->html_alert($mess, "success");
                 break;
             case "do_trash":
                 $up_id = isset($ttH->input["id"]) ? array($ttH->input["id"]) : $up_id;
                 $mess = $ttH->lang['global']['trash_success'] . " ID: <strong>";
                 $str_mess = "";
                 for ($i = 0; $i < count($up_id); $i++) {
                     $dup = array();
                     $dup['is_show'] = 0;
                     $ok = $ttH->db->do_update("menu", $dup, "menu_id=" . $up_id[$i]);
                     if ($ok) {
                         $str_mess .= $str_mess ? ", " : "";
                         $str_mess .= $up_id[$i];
                     } else {
                         $mess .= $ttH->lang["global"]['trash_false'] . " ID: <strong>" . $up_id[$i] . "</strong>";
                     }
                 }
                 $mess .= $str_mess . "</strong>";
                 $err = $ttH->html->html_alert($mess, "success");
                 break;
             case "do_del":
                 if (isset($ttH->input['id'])) {
                     $list_del = $ttH->input['id'];
                 } elseif (isset($ttH->post['selected_id']) && is_array($ttH->post['selected_id'])) {
                     $list_del = @implode(',', $ttH->post['selected_id']);
                 }
                 $err = $this->do_del($list_del);
                 break;
         }
     }
     $p = isset($ttH->input["p"]) ? $ttH->input["p"] : 1;
     $group_id = $this->cur_group;
     $search_date_begin = isset($ttH->input["search_date_begin"]) ? $ttH->input["search_date_begin"] : "";
     $search_date_end = isset($ttH->input["search_date_end"]) ? $ttH->input["search_date_end"] : "";
     $search_parent_id = isset($ttH->input["search_parent_id"]) ? $ttH->input["search_parent_id"] : 0;
     $search_show_mod = isset($ttH->input["search_show_mod"]) ? $ttH->input["search_show_mod"] : '';
     $search_title = isset($ttH->input["search_title"]) ? $ttH->input["search_title"] : "";
     $where = " ";
     $ext = "";
     $is_search = 0;
     if ($is_show == "trash") {
         //$where .= " and is_show=0 ";
     } else {
         $where .= " and is_show=1 ";
     }
     if (!empty($group_id)) {
         $where .= " and group_id='" . $group_id . "' ";
         $ext .= "&group_id=" . $group_id;
     }
     if ($search_date_begin || $search_date_end) {
         $tmp1 = @explode("/", $search_date_begin);
         $time_begin = @mktime(0, 0, 0, $tmp1[1], $tmp1[0], $tmp1[2]);
         $tmp2 = @explode("/", $search_date_end);
         $time_end = @mktime(23, 59, 59, $tmp2[1], $tmp2[0], $tmp2[2]);
         $where .= " AND (date_create BETWEEN {$time_begin} AND {$time_end} ) ";
         $ext .= "&date_begin=" . $search_date_begin . "&date_end=" . $search_date_end;
         $is_search = 1;
     }
     if (!empty($search_parent_id)) {
         $where .= " and parent_id='" . $search_parent_id . "' ";
         $ext .= "&search_parent_id=" . $search_parent_id;
         $is_search = 1;
     }
     if (!empty($search_show_mod)) {
         $where .= " and (show_mod='' or find_in_set('" . $search_show_mod . "',show_mod)) ";
         $ext .= "&search_show_mod=" . $search_show_mod;
         $is_search = 1;
     }
     if (!empty($search_title)) {
         $where .= " and (menu_id='{$search_title}' or title like '%{$search_title}%' or link like '%{$search_title}%') ";
         $ext .= "&search_title=" . $search_title;
         $is_search = 1;
     }
     $where_root = "";
     if ($is_search == 0) {
         $where_root .= " and parent_id=0  ";
     }
     $num_total = 0;
     $res_num = $ttH->db->query("select menu_id \r\r\n\t\t\t\t\t\tfrom menu \r\r\n\t\t\t\t\t\twhere lang='" . $ttH->conf["lang_cur"] . "' \r\r\n\t\t\t\t\t\t" . $where_root . $where . " ");
     $num_total = $ttH->db->num_rows($res_num);
     $n = $ttH->conf["n_list"] ? $ttH->conf["n_list"] : 30;
     $num_menus = ceil($num_total / $n);
     if ($p > $num_menus) {
         $p = $num_menus;
     }
     if ($p < 1) {
         $p = 1;
     }
     $start = ($p - 1) * $n;
     $link_action = $ttH->admin->get_link_admin($this->modules, $this->action, $this->sub);
     //Sort
     $arr_title = array("name_action" => array("title" => $ttH->lang["global"]["name_action"], "link" => $link_action . "&p=" . $p . $ext . "&sort=name_action-desc", "class" => ""), "show_order" => array("title" => $ttH->lang["global"]["show_order"], "link" => $link_action . "&p=" . $p . $ext . "&sort=show_order-desc", "class" => ""), "title" => array("title" => $ttH->lang["global"]["title"], "link" => $link_action . "&p=" . $p . $ext . "&sort=title-desc", "class" => ""), "link" => array("title" => $ttH->lang["global"]["link"], "link" => $link_action . "&p=" . $p . $ext . "&sort=link-desc", "class" => ""), "auto_sub" => array("title" => 'Cấp con tự động', "link" => $link_action . "&p=" . $p . $ext . "&sort=auto_sub-desc", "class" => ""), "date_create" => array("title" => $ttH->lang["global"]["date_create"], "link" => $link_action . "&p=" . $p . $ext . "&sort=date_create-desc", "class" => ""));
     $sort = isset($ttH->input["sort"]) ? $ttH->input["sort"] : "";
     if ($sort) {
         $arr_allow_sort = array(1 => "asc", 2 => "desc");
         $tmp = explode("-", $sort);
         if (array_key_exists($tmp[0], $arr_title) && in_array($tmp[1], $arr_allow_sort)) {
             $order_tmp = $tmp[0] == "menu_id" ? "a.menu_id" : $tmp[0];
             $where .= " order by " . $order_tmp . " " . $tmp[1];
             $arr_title[$tmp[0]]["class"] = $tmp[1];
             $arr_title[$tmp[0]]["link"] = $link_action . "&p=" . $p . $ext . "&sort=" . $tmp[0] . "-" . $arr_allow_sort[3 - array_search($tmp[1], $arr_allow_sort)];
         } else {
             $sort = "";
         }
     }
     if ($sort == "") {
         $where .= " order by show_order desc, date_create asc";
     }
     //End sort
     //Title row
     foreach ($arr_title as $k => $v) {
         $class = $v["class"] ? " class='" . $v["class"] . "'" : "";
         $data["f_" . $k] = '<a href="' . $v["link"] . '" ' . $class . '>' . $v["title"] . '</a>';
     }
     //End title row
     $sql = "select * from menu \r\r\n\t\t\t\t\t\twhere lang='" . $ttH->conf["lang_cur"] . "' \r\r\n\t\t\t\t\t\t" . $where_root . $where . " \r\r\n\t\t\t\t\t\tlimit {$start},{$n}";
     //echo $sql;
     $nav = $ttH->admin->admin_paginate($link_action, $num_total, $n, $ext, $p);
     $result = $ttH->db->query($sql);
     $i = 0;
     $data['row_item'] = '';
     $html_row = "";
     if ($num = $ttH->db->num_rows($result)) {
         while ($row = $ttH->db->fetch_row($result)) {
             $i++;
             $data['row_item'] .= $this->manage_row($row, $is_show);
             if ($is_search == 0) {
                 $data['row_item'] .= $this->manage_sub($row['menu_id'], $where, $is_show);
             }
         }
     } else {
         $ttH->temp_act->assign('row', array("mess" => $ttH->lang["global"]["no_have_data"]));
         $ttH->temp_act->parse("manage.row_empty");
     }
     $data['html_row'] = $html_row;
     $data['nav'] = $nav;
     $data['err'] = $err;
     $data['link_action_search'] = $link_action;
     $data['link_action'] = $link_action . "&p=" . $p . $ext;
     $data['search_date_begin'] = $search_date_begin;
     $data['search_date_end'] = $search_date_end;
     $data['search_title'] = $search_title;
     $data["list_group_search"] = list_group("group_id", $group_id, " class=\"form-control\" onchange=\"window.location.href='" . $link_action . "&group_id='+this.value;\"");
     $data["list_parent_search"] = list_menu($group_id, "search_parent_id", $search_parent_id, " class=\"form-control\"", array("title" => $ttH->lang['global']['select_title']));
     $data["list_module_search"] = list_module("search_show_mod", $search_show_mod, " class=\"form-control\"", array('title' => $ttH->lang["global"]["select_title"]));
     $data['form_search_class'] = $is_search == 1 ? ' expand' : '';
     if ($is_show == "trash") {
         $ttH->temp_act->parse("manage.button_manage");
     } else {
         $ttH->temp_act->parse("manage.button_trash");
     }
     $ttH->temp_act->assign('data', $data);
     $ttH->temp_act->parse("manage");
     return $ttH->temp_act->text("manage");
 }
Beispiel #8
0
      	  <td><input id="user_alias" class="ud_user_alias" required name="ud_user_alias" type="text" value="<?= $row['user_alias']; ?>" /></td>
   	  </tr>
        <tr>
          <td>Profile Photo:</td>
          <td class="space"><input name="new_image" id="new_image" size="30" type="file" class="fileUpload" /> <img src="<?= $row['profile_pic']; ?>" height="40px" /></td>
        </tr>
      	<tr>
          <td>Access Level: *</td>
      	  <td>
		<?php get_value("access_levels", array("access_id"), array($row['access_level'])); ?>
          <select name="ud_access_level" id="access_level2" required>
              <option value="<?php echo $row['access_level']; ?>"><?php echo $value_row['access_level']; ?> </option>
              <option value="">-----</option>
                <? $module = "access_levels";
				$order = "ORDER BY access_level ASC";
				$option1 = "access_level";
				$value = "access_id";
				list_menu($module, $order, $option1, "", $value, "*"); ?>         
                </select></td>
   	  </tr>
	      <tr>
	        <td>&nbsp;</td>
	        <td> <button name="Upload" type="submit" class="btn btn-primary">Save Changes</button></td>
	      </tr>
    </tbody>
  </table>
</form>
  </div>
  </div>
  </div>
<? }?>
Beispiel #9
0
<!--<?php 
$mods = list_modules();
$pos = list_positions();
?>
<table>
<?php 
foreach ($mods as $module) {
    ?>
							<tr>
								<th colspan="4"><?php 
    echo $module;
    ?>
</th>
							</tr>
<?php 
    $menus = list_menu($module);
    foreach ($pos as $position) {
        ?>
							<tr>
								<th></th>
								<th colspan="3"><?php 
        echo $position;
        ?>
</th>
							</tr>
<?php 
        $rubs = list_db("select distinct Menu_Rubrique from Caranille_Menu where Menu_Module = '{$module}' and Menu_Position = '{$position}' order by Menu_Rubrique ASC");
        if (!empty($rubs)) {
            foreach ($rubs as $rubrique) {
                extract($rubrique);
                ?>
function shortcodeforsrm($atts)
{
    $srm = list_menu($atts);
    $menu_title = sr_set_css('si_sr_menu_title', SR_MENU_TITLE);
    return $srmHtml = '<div class="main-navigation-srm">
						 <div class="rmm-toggled-controls">
							  <div class="sr-menu-toggle">' . $menu_title . '
								  <div class="srm-menu-toggle rmm-button rmm-closed" style="float:right; ">
									  <span>&nbsp;</span>
									  <span>&nbsp;</span>
									  <span>&nbsp;</span>
								  </div>
							  </div> 
						 </div>
						' . $srm . '
	                  </div>';
}
            echo "<option value='0'>-Select Parliament-</option>\n";
            for ($i = 1; $i <= $num_rows; $i++) {
                $rowPC = getRows($rsPC);
                echo "<option value='{$rowPC['0']}'>{$rowPC['1']}</option>\n";
            }
        }
        unset($rsPC, ${$num_rows}, $rowPC);
    }
}
?>
</select></td></tr>
    <tr><td colspan="2" align="left">Permission</td></tr>
    <tr><td colspan="2">
    <table id="table1" width="100%"><tr><th>Menu</th><th>First Level Submenu</th></tr>
	<?php 
$rsMenu = list_menu();
$num_rows = rowCount($rsMenu);
if ($num_rows > 0) {
    echo "\n<input type='hidden' name='hid_menucount' id='hid_menucount' value='{$num_rows}' />\n";
    for ($i = 1; $i <= $num_rows; $i++) {
        $rowMenu = getRows($rsMenu);
        $menu = $rowMenu['menu_cd'];
        echo "<tr><td align='left'><input type='checkbox' id='chkmenu_{$i}' name='chkmenu_{$i}' /><label for='chkmenu_{$i}'>" . $rowMenu['menu'] . "</label><input type='hidden' name='hidmenu_{$i}' id='hidmenu_{$i}' value='{$menu}' /></td>\n";
        echo "<td align='left'>";
        $rsSubmenu = list_submenu_ag_menu($menu);
        $num_rows_submenu = rowCount($rsSubmenu);
        echo "<input type='hidden' name='hid_submenucount_{$i}' id='hid_submenucount_{$i}' value='{$num_rows_submenu}' />";
        if ($num_rows_submenu > 0) {
            for ($j = 1; $j <= $num_rows_submenu; $j++) {
                $rowSubmenu = getRows($rsSubmenu);
                $submenu = $rowSubmenu['submenu_cd'];