當前位置: 首頁>>代碼示例>>PHP>>正文


PHP main_page函數代碼示例

本文整理匯總了PHP中main_page函數的典型用法代碼示例。如果您正苦於以下問題:PHP main_page函數的具體用法?PHP main_page怎麽用?PHP main_page使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了main_page函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: switch_main

function switch_main()
{
    switch ($_GET["main"]) {
        case "init":
            $content = main_page();
            break;
        case "enable_kasper":
            main_kaspersky();
            exit;
            break;
        case "kasper_level":
            main_kaspersky_level();
            exit;
            break;
        case "kasper_action":
            main_kaspersky_action();
            exit;
            break;
        case "kasper_save":
            main_kaspersky_save();
            exit;
            break;
        case "fetchmail":
            main_fetchmail();
            exit;
            break;
        case "main_fetchmail_1":
            main_fetchmail_1();
            exit;
            break;
        case "main_fetchmail_2":
            main_fetchmail_2();
            exit;
            break;
        case "main_fetchmail_3":
            main_fetchmail_3();
            exit;
            break;
        case "main_fetchmail_build":
            main_fetchmail_build();
            exit;
            break;
        case "postmaster":
            main_postmaster();
            exit;
            break;
        default:
            $content = main_page();
    }
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body(render_page($content));
}
開發者ID:brucewu16899,項目名稱:1.6.x,代碼行數:52,代碼來源:configure.server.php

示例2: exit_error

    } else {
        exit_error($Language->getText('global', 'error'), $Language->getText('docman_admin_index', 'error_nodoc'));
    }
} elseif (strstr($mode, "groupadd")) {
    $query = "insert into doc_groups(groupname,group_id,group_rank) " . "values ('" . htmlspecialchars($groupname) . "'," . "'{$group_id}'," . "'{$group_rank}')";
    db_query($query);
    $feedback .= $Language->getText('docman_admin_index', 'feedback_group_added');
    group_main_page($group_id);
} elseif (strstr($mode, "editgroups")) {
    group_main_page($group_id);
} elseif (strstr($mode, "docdelete")) {
    // Get title
    $query = "SELECT title FROM doc_data WHERE docid={$docid}";
    $result = db_query($query);
    $row = db_fetch_array($result);
    $title = $row['title'];
    $query = "DELETE FROM doc_data WHERE docid={$docid}";
    $result = db_query($query);
    if (!$result) {
        $feedback .= " " . $Language->getText('docman_admin_index', 'error_deleting_doc');
        echo db_error();
    } else {
        $feedback .= " " . $Language->getText('docman_admin_index', 'doc_deleted');
        // Log in project history
        group_add_history('doc_deleted', $title, $group_id, array($title));
    }
    main_page($group_id);
} else {
    main_page($group_id);
}
//end else
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:31,代碼來源:index.php

示例3: flash_message

    $form_container->end();
    $buttons[] = $form->generate_submit_button('Submit');
    $form->output_submit_wrapper($buttons);
    $form->end();
}
$errors = [];
$dn = '';
if ($mybb->input['action'] == 'change') {
    if (!verify_post_check($mybb->input['my_post_key'])) {
        flash_message($lang->invalid_post_verify_key2, 'error');
        admin_redirect("index.php?module=cloudflare-cache_lvl");
    }
    $request = $cloudflare->cache_level($mybb->get_input('cache_level'));
    if ($request->success) {
        $dn = $cloudflare->get_readable_dt(date());
        $page->output_success("Cache level is now as {$mybb->get_input('cache_level')}");
    } else {
        $errors[] = $request->errors[0]->message;
        $page->output_error($request->errors[0]->message);
    }
}
if (!isset($mybb->input['cache_level']) && empty($errors)) {
    $request = $cloudflare->cache_level();
    $current_cache_level = $request->result->value;
    $dn = $cloudflare->get_readable_dt($request->result->modified_on);
} else {
    $current_cache_level = $mybb->input['cache_level'];
}
$page->output_alert("The cache level is currently set to {$current_cache_level} (Modified on: {$dn})");
main_page($current_cache_level, $dn);
$page->output_footer();
開發者ID:dequeues,項目名稱:MyBB-CloudFlare-Manager,代碼行數:31,代碼來源:cloudflare_cache_lvl.php

示例4: usersMenus

<?php
	include_once('ressources/class.templates.inc');
	include_once('ressources/class.ldap.inc');
	include_once('ressources/class.users.menus.inc');
	include_once('ressources/class.artica.inc');
	include_once('ressources/class.ini.inc');
	include_once('ressources/class.amavis.inc');
	$user=new usersMenus();
	if($user->AsPostfixAdministrator==false){
		$tpl=new templates();
		echo "alert('". $tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."');";
		die();exit();
	}
	writelogs($_SERVER['QUERY_STRING'],null,__FILE__);
	if(isset($_GET["status"])){page_status();exit;}
	if(isset($_GET["section"])){main_page();exit;}
	if(isset($_GET["script"])){main_select_scripts();exit;}
	if(isset($_GET["popup"])){main_select_popups();exit;}
	if(isset($_GET["TrustLocalHost"])){trustlocal_save();exit;}
	if(isset($_GET["ip_from"])){localnetwork_save();exit;}
	if(isset($_GET["ip_delete"])){localnetwork_del();exit;}
	if(isset($_GET["D_EXPLAIN"])){filterbehavior_explain();exit;}
	if(isset($_GET["INI_SAVE"])){INI_SAVE();exit;}
	if(isset($_GET["saveToServer"])){apply_popup2();exit;}
	if(isset($_GET["add_exts"])){filterextension_add();exit;}
	if(isset($_GET["del_ext"])){filterextension_del();exit;}
	if(isset($_GET["EnableAmavisBackup"])){backup_save();exit;}
	if(isset($_GET["ajax"])){ajax_js();exit;}
	if(isset($_GET["ajax-pop"])){ajax_popup();exit;}
	if(isset($_GET["sanesecurity-js"])){sanesecurity_js();exit;}
	if(isset($_GET["sanesecurity-popup"])){sanesecurity_popup();exit;}
開發者ID:rsd,項目名稱:artica-1.5,代碼行數:31,代碼來源:amavis.index.php

示例5: rerun

function rerun($job_id)
{
    global $uroles, $editdata, $scheduler, $username, $useremail, $dbconn;
    $dbconn->SetFetchMode(ADODB_FETCH_BOTH);
    logAccess("USER {$username} CHOSE TO RERUN SCAN {$job_id}");
    $sql_access = "";
    if (!$uroles['admin']) {
        $sql_access = "AND username='{$username}'";
    }
    $query = "SELECT * FROM vuln_jobs WHERE id = '{$job_id}' {$sql_access}";
    $result = $dbconn->execute($query);
    #list( $sname, $notify_email, $job_type, $schedule_type, $timeout, $SVRid, $sid, $targetlist ) = $result->fields;
    $editdata = $result->fields;
    if ($editdata['id'] == $job_id) {
        main_page($job_id, "rerun");
    } else {
        //logAccess( "INVALID JOBID $job_id" );
        echo "<p><font color=red>INVALID JOB ID</font></p>";
    }
}
開發者ID:AntBean,項目名稱:alienvault-ossim,代碼行數:20,代碼來源:sched.php

示例6: main_page

			<li><b>Essentially Off:</b> Challenges only the most grievous offenders</li>
			<li><b>Low:</b> Challenges only the most threatening visitors</li>
			<li><b>Medium:</b> Challenges both moderate threat visitors and the most threatening visitors</li>
			<li><b>High:</b> Challenges all visitors that have exhibited threatening behavior within the last 14 days</li>
			<li><b>I\'m Under Attack!:</b> Should only be used if your website is under a DDoS attack</li>
				<ul><li>Visitors will receive an interstitial page while we analyze their traffic and behavior to make sure they are a legitimate human visitor trying to access your website</li></ul>
			</li>
		</ul>', $form->generate_select_box('sec_level', $security_levels, $current_setting));
    $form_container->end();
    $buttons[] = $form->generate_submit_button('Submit');
    $form->output_submit_wrapper($buttons);
    $form->end();
}
$errors = [];
if ($mybb->input['action'] == 'change_security_level') {
    $request = $cloudflare->security_level_setting($mybb->input['sec_level']);
    if ($request->success) {
        $page->output_success("The security level has now been set to {$security_levels[$mybb->input['sec_level']]}");
    } else {
        $page->output_error($request->errors[0]->message);
    }
}
if ($mybb->input['action'] == 'change_security_level' && empty($errors)) {
    $current_setting = $mybb->input['sec_level'];
} else {
    $request = $cloudflare->security_level_setting();
    $current_setting = $request->result->value;
}
$page->output_alert("The current security level is set as {$security_levels[$current_setting]}");
main_page($current_setting);
$page->output_footer();
開發者ID:dequeues,項目名稱:MyBB-CloudFlare-Manager,代碼行數:31,代碼來源:cloudflare_security_lvl.php

示例7: events_js

if(isset($_GET["install_app"])){install_app();exit;}
if(isset($_GET["InstallLogs"])){GetLogsStatus();exit;}
if(isset($_GET["TestConnection-js"])){TestConnection_js();exit;}
if(isset($_GET["testConnection"])){testConnection();exit;}
if(isset($_GET["remove"])){remove();exit;}
if(isset($_GET["uninstall_app"])){remove_perform();exit;}
if(isset($_GET["remove-refresh"])){remove_refresh();exit;}
if(isset($_GET["ui-samba"])){install_remove_services();exit;}
if(isset($_GET["clear"])){clear();exit;}
if(isset($_GET["SynSysPackages"])){SynSysPackages();exit;}
if(isset($_GET["softwares-available"])){software_available();exit;}
if(isset($_GET["remove-app-js"])){remove_app_js();exit;}
if(isset($_POST["remove-app-perform"])){remove_app_perform();exit;}
if(isset($_GET["RefreshMysqlSetup"])){RefreshMysqlSetup();exit;}

if(posix_getuid()<>0){main_page();}

function events_js(){
	$page=CurrentPageName();
	$tpl=new templates();
	$title=$tpl->_ENGINE_parse_body("{events}::{{$_GET["CODE_NAME"]}}");
	echo "YahooWin5(770,'$page?events-list=yes&CODE_NAME={$_GET["CODE_NAME"]}','$title');";
	
}

function remove_app_js(){
	$page=CurrentPageName();
	$tpl=new templates();
	$t=time();
	$ask=$tpl->javascript_parse_text("{remove_software_ask}:{{$_GET["app"]}} ?");
$html="
開發者ID:brucewu16899,項目名稱:1.6.x,代碼行數:31,代碼來源:setup.index.php

示例8: delete_album

function delete_album()
{
    $id = $_REQUEST['id'];
    $album = fetch_album($id);
    $title = $album['title'];
    if (isset($_REQUEST['cancel'])) {
        message("Cancelled delete of album \"{$title}\"");
        main_page();
    }
    delete_album_sql($id);
    message("Album \"{$title}\" deleted.");
    main_page();
}
開發者ID:kbglobal51,項目名稱:yii-trackstar-sample,代碼行數:13,代碼來源:crud.php

示例9: main_page

function main_page($in_dev_mode, $time_remaining = 0)
{
    global $page;
    if ($in_dev_mode) {
        $page->output_alert("CloudFlare is currently in development mode. This will expire in " . gmdate("H:i:s", $time_remaining));
    }
    $form = new Form('index.php?module=cloudflare-dev_mode&amp;action=change', 'post');
    $form_container = new FormContainer('Change development mode');
    $form_container->output_row('Development Mode', "This will bypass CloudFlare's accelerated cache and slow down your site, but is useful if you are making changes to cacheable content (like images, css, or JavaScript) and would like to see those changes right away.", $form->generate_on_off_radio('dev_mode', $in_dev_mode ? 1 : 0));
    $form_container->end();
    $buttons[] = $form->generate_submit_button('Submit');
    $form->output_submit_wrapper($buttons);
    $form->end();
}
if ($mybb->input['action'] == 'change') {
    if (!verify_post_check($mybb->input['my_post_key'])) {
        flash_message($lang->invalid_post_verify_key2, 'error');
        admin_redirect("index.php?module=cloudflare-dev_mode");
    }
    $new_setting = $mybb->get_input('dev_mode') == '0' ? 'off' : 'on';
    $request = $cloudflare->dev_mode($new_setting);
    if ($request->success) {
        $page->output_success("Turned development mode {$new_setting}", 'success');
    } else {
        $page->output_error($request->errors[0]->message);
    }
}
$dev_request = $cloudflare->dev_mode();
$in_dev = $dev_request->result->value == "off" ? false : true;
main_page($in_dev, $dev_request->result->time_remaining);
$page->output_footer();
開發者ID:dequeues,項目名稱:MyBB-CloudFlare-Manager,代碼行數:31,代碼來源:cloudflare_dev_mode.php

示例10: mysqli

<?php

require "components.php";
$db = new mysqli("email.c9ssouqvesbm.us-west-2.rds.amazonaws.com", "root", "email123", "Email Subscription");
if ($db->connect_error) {
    echo $db->connect_error . "<br>" . "connection not successfull";
}
$status = "verified";
$stmt = $db->prepare("Update users SET status=? where email=?");
$stmt->bind_param("ss", $status, $_REQUEST["email"]);
$response = $stmt->execute();
if ($response) {
    echo main_page("Your email address has been successfully verified, to change your times simply re-subscribe with desired times.");
} else {
    echo main_page("Something went wrong, try again");
}
?>


開發者ID:rungwe,項目名稱:psychology-app,代碼行數:17,代碼來源:verification.php

示例11: die

if (!defined("IN_MYBB")) {
    die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}
$page->add_breadcrumb_item("CloudFlare Manager", "index.php?module=cloudflare");
$page->add_breadcrumb_item("IPv6 Support", "index.php?module=cloudflare-ipv46");
$page->output_header("CloudFlare Manager - IPv6 Support");
$ipv6_mode_enabled = $cloudflare->ipv46_setting()->result->value == 'on' ? true : false;
function main_page($enabled)
{
    $form = new Form('index.php?module=cloudflare-ipv46&amp;action=change', 'post');
    $form_container = new FormContainer("IPv6 Support");
    $form_container->output_row('IPv6 Support', 'Enable IPv6 support and gateway', $form->generate_yes_no_radio('enable_ipv6', $enabled ? "1" : "0"));
    $form_container->end();
    $buttons[] = $form->generate_submit_button('Submit');
    $form->output_submit_wrapper($buttons);
    $form->end();
}
if ($mybb->input['action'] == 'change') {
    if (!verify_post_check($mybb->input['my_post_key'])) {
        flash_message($lang->invalid_post_verify_key2, 'error');
        admin_redirect("index.php?module=cloudflare-ipv6");
    }
    $request = $cloudflare->ipv46_setting($mybb->get_input('enable_ipv6') == '0' ? 'off' : 'on');
    if ($request->success) {
        $page->output_success("<p><em>IPv6 subdomain support has been enabled for this domain.</em></p>");
    } else {
        $page->output_inline_error($request->errors);
    }
}
main_page($ipv6_mode_enabled);
$page->output_footer();
開發者ID:dequeues,項目名稱:MyBB-CloudFlare-Manager,代碼行數:31,代碼來源:cloudflare_ipv46.php

示例12: error_page

    error_page("no such app");
}
$bus = BoincUserSubmit::lookup_userid($user->id);
if (!$bus) {
    error_page("no access");
}
if (!$bus->manage_all) {
    $busa = BoincUserSubmitApp::lookup("user_id={$user->id} and app_id={$app_id}");
    if (!$busa || !$busa->manage) {
        error_page("no access");
    }
}
$action = get_str("action", true);
switch ($action) {
    case "":
        main_page($app);
        break;
    case "app_version_form":
        app_version_form($app);
        break;
    case "app_version_action":
        app_version_action($app);
        break;
    case "permissions_form":
        permissions_form($app);
        break;
    case "permissions_action":
        permissions_action($app);
        break;
    case "batches_form":
        batches_form($app);
開發者ID:nicolas17,項目名稱:boincgit-test,代碼行數:31,代碼來源:manage_app.php

示例13: setup_remove_lock_files

 $pass_disp->Dispatch();
 // Checks if all setup phases are completed
 //
 if (setup_check_lock_files()) {
     // Removes setup lock files
     //
     setup_remove_lock_files();
     if (!setup_remove_setup_lock_file()) {
         $log->logevent('ampoliros.root.main_php', 'Unable to remove lock file during initialization', LOGGER_ERROR);
     }
 }
 clearstatcache();
 // Checks if there are remaining setup phases
 //
 if (!file_exists(AMP_SETUP_LOCK)) {
     main_page(TRUE);
 } else {
     import('com.solarix.ampoliros.dblayer.DBLayerFactory');
     // System check
     //
     if (!file_exists(TMP_PATH . '.systemchecked')) {
         $systemok = true;
         $row = 0;
         @touch(TMP_PATH . '.checkingsystem', time());
         // !!! $page->add( new HTMLScript( 'JavaScript1.2', 'parent.frames.sum.location.reload()', '' ) );
         $hui_titlebar->mTitle .= ' - ' . $amp_locale->GetStr('systemcheck_title');
         $hui_info_table = new HuiTable('sysinfotable', array('headers' => $headers));
         // Required features
         // /ampcgi/ alias
         //
         $row = 0;
開發者ID:alexpagnoni,項目名稱:ampoliros,代碼行數:31,代碼來源:main.php

示例14: rerun

function rerun($job_id)
{
    global $uroles, $editdata, $scheduler, $username, $useremail, $dbconn;
    logAccess("USER {$username} CHOSE TO RERUN SCAN {$job_id}");
    $sql_access = "";
    if (!$uroles['admin']) {
        $sql_access = "AND username='{$username}'";
    }
    $query = "SELECT id, name, fk_name, notify, job_TYPE, meth_SCHED, meth_TARGET, \n                     meth_CRED, meth_VSET, meth_Wcheck, meth_Wfile, \n\t\t     meth_Ucheck, meth_TIMEOUT, scan_ASSIGNED, authorized\n              FROM vuln_jobs WHERE id = '{$job_id}' {$sql_access}";
    $result = $dbconn->execute($query);
    #list( $sname, $notify_email, $job_type, $schedule_type, $timeout, $SVRid, $sid, $targetlist ) = $result->fields;
    $editdata = $result->fields;
    if ($editdata['id'] == $job_id) {
        main_page($job_id, "rerun");
    } else {
        //logAccess( "INVALID JOBID $job_id" );
        echo "<p><font color=red>INVALID JOB ID</font></p>";
    }
}
開發者ID:jhbsz,項目名稱:ossimTest,代碼行數:19,代碼來源:sched.php

示例15: main_page

<?php

require "components.php";
echo main_page();
?>


開發者ID:rungwe,項目名稱:psychology-app,代碼行數:5,代碼來源:index.php


注:本文中的main_page函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。