function popup() { if (is_base64_encoded($_GET["ou"])) { $_GET["ou"] = base64_decode($_GET["ou"]); } $form = "<table style='width:100%;margin:0px;padding:0px'>\n\t<tr>\n\t\t<td style='margin:0px;padding:0px'>" . Field_text("find-member", null, 'width:100%;font-size:12px;padding:5px;margin:5px', null, null, null, false, "FindMemberPress(event)") . "</td>\n\t</tr>\n\t</table>"; $html = "<H2>{find_members}»{$_GET["ou"]}</H2>\n\t{$form}\n\t<hr>\n\t<div id='search-results' style='width:100%;height:350px;overflow:auto'>" . find_member() . "</div>"; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html); }
$error = "{ERROR_NO_PRIVS}"; echo $tpl->_ENGINE_parse_body("alert('{$error}')"); die; } header("location:domains.manage.org.index.php?ou={$_GET["ou"]}"); } if (isset($_GET["popup"])) { popup(); exit; } if (isset($_GET["find-member"])) { echo find_member(); exit; } if (isset($_GET["search"])) { echo find_member(); exit; } js(); function js() { $page = CurrentPageName(); $prefix = str_replace('.', "_", $page); $tpl = new templates(); $dn = urlencode($_GET["dn"]); $find = $tpl->_ENGINE_parse_body("{find}"); if ($_GET["encoded"] == "yes") { $_GET["ou"] = base64_decode($_GET["ou"]); } $ou = $_GET["ou"]; $ou_encrypted = base64_encode($ou);
$errors[] = $fieldname; } } $field_patterns = array('name' => '/^[a-zA-Z ]{3,20}$/', 'username' => '/^[a-z]{1}[a-z0-9_]{3,13}$/', 'spoj' => '/^[a-z]{1}[a-z0-9_]{2,13}$/', 'codechef' => '/^[a-z]{1}[a-z0-9_]{3,13}$/', 'hackerrank' => '/^[a-zA-Z0-9_]{5,16}$/', 'phone_number' => '/^[7-9]{1}[0-9]{9}/', 'email' => '/^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$/', 'admission' => '/^[2]{1}[0-1]{2}[0-9]{1}[a-zA-Z]{2}[0-9]{4}$/'); foreach ($field_patterns as $fieldname => $pattern) { if (preg_match($pattern, $_POST[$fieldname]) == 0) { $errors[] = $fieldname; } } if (!is_null(find_user_exist($_POST['username']))) { $errors[] = 'username'; } if (!is_null(find_email($_POST['email']))) { $errors[] = 'email'; } if (is_null(find_member($_POST['member']))) { $errors[] = 'member'; } if (!is_null(find_member_exist($_POST['member']))) { $errors[] = 'member'; } if (!empty($errors)) { //print_r($errors) ; redirect_to("login.php"); } else { $username = mysql_prep($_POST["username"]); $verification_link = random_string(); $verification_link_send = urlencode($verification_link); $idiot_link = urlencode(random_string()); $email = mysql_prep($_POST['email']); $name = mysql_prep($_POST['name']);