function popup_list() { $group = new groups(); $ou_con = base64_decode($_GET["ou"]); if ($ou_con != null) { $_GET["ou"] = $ou_con; } $hash_group = $group->list_of_groups($_GET["ou"], 1); $hash_group[null] = "{no_group}"; $uid = $_GET["uid"]; $html = "<table style='width:80%'>"; while (list($num, $ligne) = each($hash_group)) { $html = $html . "<tr " . CellRollOver("AddAjaxPopUpGroupV2('{$ou}','{$uid}',{$num},'{$ligne}');", "{add_group} {$ligne}") . ">\n\t\t\t<td width=1%><img src='img/32-group-icon.png'></td>\n\t\t\t<td valign='middle' style='font-size:14px;font-weight:bold'>{$ligne} ({$num})</a></td>\n\t\t\t</tr>"; } $html = $html . "</table>"; $tpl = new Templates(); echo $tpl->_ENGINE_parse_body($html); }
function USER_GROUP_POPUP_ADD() { $group = new groups(); $ou_con = base64_decode($_GET["ou"]); if ($ou_con != null) { $_GET["ou"] = $ou_con; } $hash_group = $group->list_of_groups($_GET["ou"], 1); $hash_group[null] = "{no_group}"; $uid = $_GET["uid"]; $html = "\n\t<h1>{add_group}</H1>\n\t<div style='width:100%;height:300px;overflow:auto'>\n\t<input type='hidden' id='ADD_USER_GROUP_ASK' value='{ADD_USER_GROUP_ASK}'>\n\t<table style='width:80%' class=table_form>\n\t\t\n\t\t\t\n\t"; while (list($num, $ligne) = each($hash_group)) { $html = $html . "<tr " . CellRollOver("AddAjaxPopUpGroupV2('{$ou}','{$uid}',{$num},'{$ligne}');", "{add_group} {$ligne}") . ">\n\t\t\t<td width=1%><img src='img/32-group-icon.png'></td>\n\t\t\t<td valign='middle' style='font-size:15px;font-weight:bold'>{$ligne} ({$num})</a></td>\n\t\t\t</tr>"; } $html = $html . "</table></div>"; $tpl = new Templates(); echo $tpl->_ENGINE_parse_body($html); }
function popup_list() { $ou = $_GET["ou"]; $group = new groups(); $ou_con = base64_decode($_GET["ou"]); if ($ou_con != null) { $_GET["ou"] = $ou_con; } $hash_group = $group->list_of_groups($_GET["ou"], 1); $hash_group[null] = "{no_group}"; $uid = $_GET["uid"]; $t = $_GET["tt"]; $data = array(); $data['page'] = 1; $data['total'] = count($hash_group); $data['rows'] = array(); $search = string_to_flexregex(); $c = 0; while (list($num, $ligne) = each($hash_group)) { $md5 = md5($ligne); if ($search != null) { if (!preg_match("#{$search}#i", $ligne)) { continue; } } $c++; $data['rows'][] = array('id' => $md5, 'cell' => array(imgsimple("group-32.png", null, "AddAjaxPopUpGroupV2{$t}('{$ou}','{$uid}',{$num},'{$ligne}')"), "<span style='font-size:16px;'>\n\t\t\t\t\t\t<a href=\"javascript:blur();\"\n\t\t\t\t\t\tOnClick=\"javascript:AddAjaxPopUpGroupV2{$t}('{$ou}','{$uid}',{$num},'{$ligne}');\"\n\t\t\t\t\t\tstyle='font-size:18px;font-weight:bold;text-decoration:underline'>{$ligne} ({$num})</a></span>")); } $data['total'] = $c; echo json_encode($data); }