Пример #1
0
             if ($FORM['submit'] == "Enable") {
                 mysql_upd_record($mysql_connect_id, $table_name, array($enabled_field_name => 'Y'), join(" OR ", $delete_where));
             } else {
                 if ($FORM['submit'] == "Delete") {
                     mysql_del_record($mysql_connect_id, $table_name, join(" OR ", $delete_where));
                 }
             }
         }
     }
     header("Location: {$_SERVER['PHP_SELF']}" . $FORM['return_query_mark']);
     exit;
 } else {
     if ($FORM['f'] == "swap") {
         $table_structure = mysql_table_structure($mysql_connect_id, $table_name);
         $primary_key_field = !$primary_key_alternative ? mysql_primary_key_field($table_structure) : $primary_key_alternative;
         mysql_upd_record($mysql_connect_id, $table_name, array($FORM['field'] => $FORM['chg']), array($primary_key_field => $FORM['pri']));
         $FORM['return_query_mark'] = str_replace("\n", "&", $FORM['return_query_mark']);
         header("Location: {$_SERVER['PHP_SELF']}" . $FORM['return_query_mark']);
         #header( "Location: $_SERVER[PHP_SELF]" . str_replace( "\n", "&", $FORM['return_query'] ) );
         exit;
     } else {
         if ($FORM['f'] == "view") {
             if ($FORM['submit'] == "Next Record") {
             }
             print "<pre>";
             print_r($FORM);
             print "</pre>";
             exit;
         } else {
             if ($FORM['f'] == "goto") {
             }
Пример #2
0
include "accesscontrol.php";
require_once '/var/www/bais.islamiconlineuniversity.com/bais/config.php';
require_once $CFG->dirroot . '/course/lib.php';
require_once $CFG->dirroot . '/lib/blocklib.php';
//unset($_SESSION['sch_page_name']);
include "centerconn.php";
include "php_lib3/misc.php";
include "php_lib3/mysql.php";
$mysql_connect_id = mysql_start($mysql_server, $center_db, $mysql_username, $mysql_password);
//get the q parameter from URL
$valuecheck = $_GET["q"];
if ($valuecheck == 'Suggest page offline') {
    $updval = mysql_upd_record("", "CenterSuggestPage", "status = '0'", "id = 1");
} elseif ($valuecheck == 'Suggest page online') {
    $updval = mysql_upd_record("", "CenterSuggestPage", "status = '1'", "id = 1");
}
//check for suggest page display status
$checkpage = mysql_extract_records_where("", "CenterSuggestPage", "id=1 ", "status");
//echo $check;
$status = $checkpage[1]['status'];
if ($status == 1) {
    $inputvalue2 = "Suggest page offline";
} else {
    // suggest page online
    $inputvalue2 = "Suggest page online";
}
?>

<input type="submit" name="suggest" value="<?php 
echo $inputvalue2;