コード例 #1
0
ファイル: Inicio.php プロジェクト: GunB/PHP_AdminBasic
 function registrarse()
 {
     showHeaders();
     showMenu();
     $form = $this->M_DATA->readFile("json/registrar_usuario.json");
     $form = $this->C_FORMING->creaForm($form);
     showForm($form);
     //*/
     //showProductos1();
     showFoot();
 }
コード例 #2
0
ファイル: getTopic.php プロジェクト: eruedin/cats
function getTopicStartTest($t_id)
{
    // Wertprüfung
    $t_id = abs(intval($t_id));
    echo '<form action="index.php?site=start_test&amp;action=getQuestions" method="post">';
    $button = Function_getTopic_03;
    $topic = new Topic();
    $topic->getActiveTopic();
    $arrayTopic = $topic->getTopicArray();
    echo " <div id=\"inner_box_top\">\n";
    // In der Mitte der Inhalt
    showForm($t_id, $button, $arrayTopic);
}
コード例 #3
0
function selectForm($formType, $idNo)
{
    switch ($formType) {
        case "Oral_Prophylaxis":
            showForm(1, $idNo);
            break;
        case "Rectoration":
            showForm(2, $idNo);
            break;
        case "Extraction":
            showForm(3, $idNo);
            break;
        case "Others":
            showForm(4, $idNo);
            break;
    }
}
コード例 #4
0
ファイル: exec.php プロジェクト: nubix/cms
/**
* Bearbeitet die im POST-Array übergebenen Werte
* Stellt sicher, dass wenn das Passwort geändert wird der
* Nutzer nicht ausgeloggt wird.
*/
function editData()
{
    global $msg, $user;
    if ($_POST['password1'] != $_POST['password2']) {
        $msg->error("Das Passwort und die Wiederholung stimmen nicht überein.");
        return showForm();
    }
    foreach (array("vorname", "nachname", "email") as $key) {
        $user->setuser($key, $_POST[$key]);
    }
    if (!empty($_POST['password1'])) {
        $user->setuser("password", sha1($_POST['password1']));
        $user->loginuser($user->id);
    }
    $msg->success("Sie haben Ihre Daten geändert.");
    return showForm();
}
コード例 #5
0
function selectForm($formType, $idNo)
{
    switch ($formType) {
        case "Fecalysis":
            showForm(1, $idNo);
            break;
        case "Urinalysis":
            showForm(2, $idNo);
            break;
        case "Complete Blood Count":
            showForm(3, $idNo);
            break;
        case "Hb Shy Screening":
            showForm(4, $idNo);
            break;
    }
}
コード例 #6
0
function selectForm($formType, $idNo)
{
    switch ($formType) {
        case "VAT":
            showForm(1, $idNo);
            break;
        case "HTTA":
            showForm(2, $idNo);
            break;
        case "VS":
            showForm(3, $idNo);
            break;
        case "FMH":
            showForm(4, $idNo);
            break;
        case "MH":
            showForm(5, $idNo);
            break;
    }
}
コード例 #7
0
ファイル: asg3.php プロジェクト: davidpoulos/SchoolWork
function checkForm()
{
    $name = htmlentities($_GET['theUser'], ENT_QUOTES);
    $area = htmlentities($_GET['areaCode'], ENT_QUOTES);
    $phone1 = htmlentities($_GET['phone1'], ENT_QUOTES);
    $phone2 = htmlentities($_GET['phone2'], ENT_QUOTES);
    $errorMessage = "";
    if ($name == "") {
        $name = "";
        $errorMessage .= "<h3> You must enter your name. </h3>\n";
    }
    if ($area == "" || !is_numeric($area)) {
        $area = "";
        $errorMessage .= "<h3> You must enter a valid area code.\n";
    }
    if ($phone1 == "" || !is_numeric($phone1)) {
        $phone1 = "";
        $errorMessage .= "<h3> You must enter a valid exchange number.\n";
    }
    if ($phone2 == "" || !is_numeric($phone2)) {
        $phone2 = "";
        $errorMessage .= "<h3> You must enter a valid subscriber (end) number.\n";
    }
    if ($errorMessage) {
        print $errorMessage;
        showForm($name, $area, $phone1, $phone2);
    } else {
        if ($area == 512) {
            $result = "<br /> is from the Austin area. \n";
        } elseif ($area == 830 || $area == 210) {
            $result = "<br /> is from the San Antonio Area. \n";
        } elseif ($area == 713 || $area == 832 || $area == 409) {
            $result = "<br /> is from the Houston Area. \n";
        } else {
            $result = "<br />  is from another galaxy, far , far away. \n";
        }
        print "<h2> Hello {$name}, The phone number ({$area}-{$phone1}-{$phone2})<br /> {$result} </h2> \n";
    }
    //end else
    startOverLink();
}
コード例 #8
0
            if (count($msg) > 0) {
                showForm($arr_request, 'nuevo', $msg);
            } else {
                // Comprobar que no se repita el numero de contenedor
                $cr = getValueTable("id_contenedor", "CONTENEDOR", "numero", $contenedor);
                if (empty($cr)) {
                    $contenedor = strtoupper($contenedor);
                    $sql = "insert into CONTENEDOR (numero,id_equipo,id_naviera,manufactura,folio_imp ";
                    $sql .= ") values (";
                    $sql .= "'{$contenedor}','{$idEquipo}','{$idNav}','{$manufactura}','{$folioImp}')";
                    $db->query($sql);
                    $msg[] = "<font color=blue>El contenedor ha sido agregado...</font>";
                }
                $idConte = getValueTable("id_contenedor", "CONTENEDOR", "numero", $contenedor);
                $data[contenedor] = $contenedor;
                $data[idConte] = $idConte;
                $data[idEquipo] = $idEquipo;
                $data[idNav] = $idNav;
                showForm($data, 'editar', $msg);
            }
            break;
        default:
            showForm('', 'nuevo');
            break;
    }
} else {
    $t->set_file("page", "accesoDenegado.html");
    $t->pparse("out", "page");
}
?>
	
コード例 #9
0
ファイル: intro.php プロジェクト: nesmaster/mopsapro
{
    global $t, $db, $sesIdUsuario, $hoy, $usuario;
    $t->set_file("page", "intro.inc.html");
    $sesIdUsuario = $_SESSION[sesIdUsuario];
    $PHP_SELF = $_SERVER['PHP_SELF'];
    $sisIdOficina = $_SESSION[sesIdOficina];
    $oficina = getValueTable("oficina", "OFICINA", "id_oficina", $sisIdOficina);
    $opES = $data[opES];
    $usuario = getValueTable("usuario", "USUARIO", "id_usuario", $sesIdUsuario);
    $t->set_var(array("USUARIO" => $usuario));
    // -------------------------------------------
    //  Control de mensajes
    // -------------------------------------------
    if (!empty($msg)) {
        $canMsg = count($msg);
        if ($canMsg > 0) {
            foreach ($msg as $val) {
                $cadMsg .= $val . " <br>";
            }
            $t->set_var(array("MENSAJE" => $cadMsg));
        }
    }
    $t->pparse("out", "page");
}
// fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
// -----------------------------------------------------------
// ACCIONES
showForm($arr_request, $msg);
?>

コード例 #10
0
ファイル: login.php プロジェクト: basdog22/Qool
  <body>
    <div class="container-fluid">
    <?php 
message();
?>
    <div class="row-fluid">
    <div class="span4"></div>
    </div>
      <div class="row-fluid">
      <div class="span4"></div>
        <div class="span4 well">
        	<?php 
t("Login");
?>
        	<?php 
showForm('loginForm');
?>
        </div><!--/span-->
        <div class="span4"></div>
      </div><!--/row-->
      <hr>
      <footer>
        <p>&copy; <?php 
site('backend_title');
?>
</p>
      </footer>

    </div><!--/.fluid-container-->

    <!-- Le javascript
コード例 #11
0
ファイル: form.php プロジェクト: basdog22/Qool
<?php

message();
?>
<div class="row-fluid">
	<div class="box span12">
		<div class="box-header well">
			<h2><i class="icon-edit"></i> <?php 
t('Form');
?>
</h2>
			<div class="box-icon">
				<a href="#" class="btn btn-minimize"><i class="icon-chevron-up"></i></a>
			</div>
		</div>
		<div class="well box-content">
			<?php 
showForm('theForm');
?>
		</div>
	</div><!--/span-->

</div><!--/row-->
コード例 #12
0
ファイル: dialog.php プロジェクト: vinod-co/centa
';
		tinyMCEPopup.editor.execCommand('mceInsertContent', false, html);
		tinyMCEPopup.close();
	}
};

tinyMCEPopup.onInit.add(ExampleDialog.init, ExampleDialog);
        </script>
      </head>

      <body onload="ExampleDialog.insert();" class="dialog_body">
    <?php 
} else {
    //defaut state
    echo "<body class=\"dialog_body\">";
    showForm('');
    exit;
}
function showForm($error)
{
    ?>
<script>
    var winx = (screen.width / 2) - 250;
    var winy = (screen.height / 2) - 150;
    window.resizeTo(500, 350);
    window.moveTo(winx, winy);
</script>
<form name="uploadImage" method="post" enctype="multipart/form-data" action="<?php 
    echo $_SERVER['REQUEST_URI'] . '?' . $_SERVER['QUERY_STRING'];
    ?>
">
コード例 #13
0
ファイル: index.php プロジェクト: anhpham1509/WebProgramming
        $password = $_POST["password"];
        if ($username === "admin" and $password === "admin") {
            $_SESSION["logged"] = true;
            secretPage();
        } else {
            if ($username != null and $password != null) {
                $message = "Incorrect. Please try again";
                showTitle($guide, $message);
                showForm();
            } else {
                header('Location: ./');
            }
        }
    } else {
        showTitle($guide, $message);
        showForm();
    }
}
function secretPage()
{
    $guide = "";
    $message = "";
    $content = "";
    $page = isset($_GET['page']) ? trim($_GET['page']) : 'default';
    $logout = isset($_GET['logout']) ? trim($_GET['logout']) : false;
    if ($logout) {
        unset($_SESSION["logged"]);
        session_destroy();
        header('Location: ./');
    }
    if ($page == 1) {
コード例 #14
0
ファイル: avisoRegAdd.php プロジェクト: nesmaster/anakosta
<?php

session_start();
include_once "../include/db_mysqli.inc";
include_once "../include/template.inc";
include_once "../include/confGral.php";
$t = new Template("../templates", "keep");
// fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
function showForm($idReg)
{
    global $t, $PHP_SELF;
    $t->set_file("page", "avisoRegAdd.inc.html");
    $idReg = $idReg;
    $t->set_var(array("lnTupla" => "", "ACTION" => $PHP_SELF, "MENSAJE" => "", "ID_REG" => $idReg));
    $t->pparse("out", "page");
}
/*ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff*/
/*----------------------------------------------------------------*/
$idReg = $_GET['idReg'];
showForm($idReg);
コード例 #15
0
ファイル: categories.php プロジェクト: petitours/bxpress
    if ($errors != '') {
        RMUris::redirect_with_message(__('Errors ocurred while trying to update categories order', 'bxpress') . $errors, './categories.php', RMMSG_ERROR);
    } else {
        RMUris::redirect_with_message(__('Database updated successfully!', 'bxpress'), './categories.php', RMMSG_SUCCESS);
    }
}
$action = RMHttpRequest::request('action', 'string', '');
switch ($action) {
    case 'new':
        showForm();
        break;
    case 'save':
        bxpress_save_category();
        break;
    case 'edit':
        showForm(1);
        break;
    case 'saveedit':
        bxpress_save_category(1);
        break;
    case 'savechanges':
        updateOrderCatego();
        break;
    case 'delete':
        deleteCatego();
        break;
    case 'enable':
        activeCatego(1);
        break;
    case 'disable':
        activeCatego();
コード例 #16
0
ファイル: usage.php プロジェクト: razagilani/srrs
// Print welcome message
$t->startMain();
// Start main table
$t->startNavLinkTable();
$t->showNavLinksTable(Auth::isAdmin());
$t->endNavLinkTable();
$t->splitTable();
$db = new UsageDB();
// Connect to database
$link = CmnFns::getNewLink();
// Get Link object
// Perform function based on if search button has been pressed
if (isset($_POST['search']) || isset($_GET['text'])) {
    search($_POST['outputtype'], $_POST['searchtype']);
} else {
    showForm($db->get_min_max(), $db->get_table_data('login', array('memberid', 'fname', 'lname'), array('lname', 'fname')), $db->get_table_data('resources', array('machid', 'name'), array('name')), $db->get_table_data('schedules', array('scheduleid', 'scheduletitle'), array('scheduletitle')));
}
$t->endMain();
// End main table
$t->printHTMLFooter();
// Print HTML footer
/****** END MAIN CODE ******/
$timer->stop();
$timer->print_comment();
/**
* Perform search and print out results
* This function will perform the search for given
* criteria and print out formatted results.
* @param string $type output type
* @global $_POST['memberid'] array array of memberid's
* @global $_POST['piid'] array array of piID's
コード例 #17
0
/**
 * Función maestra, a esta se llama para mostrar todo el componente
 */
function showComponent() {
  $db = dbManager::getInstance();
  showForm($db);
  showView($db);
}
コード例 #18
0
    			if(mysql_query($editStatement))
    			{
    				showForm("Edit", "Edited Successfully!");
    			?>
    				<script>
    					 parent.location.reload(true);
    				</script>
    			<?php 
    			}
    			else
    			{
    				showForm("Edit", "Error Occurred!");
    			}
    		}*/
} else {
    showForm("Add", "");
}
function showForm($mode, $msg, $params = array())
{
    ?>
			
			<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
			<html xmlns="http://www.w3.org/1999/xhtml">
			<head>
			<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
			<title><?php 
    echo $mode;
    ?>
 CIDR/IP</title>
			<link href="bootstrap/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
			<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
コード例 #19
0
    # Check for empty credentials
    switch (true) {
        case empty($_POST["txtEmail"]):
            showForm();
            exit;
        case empty($_POST["txtPassword"]):
            showForm();
            exit;
        default:
            $Email = $_POST["txtEmail"];
            $Password = $_POST["txtPassword"];
            break;
    }
    # Validate password
    if ($Password != Password($Email, $FirstName)) {
        showForm('Invalid email and password combination');
        exit;
    }
    setcookie('FirstName', $FirstName, strtotime('+1 week'), "/");
    $_SESSION["contEmail"] = $Email;
}
# Return users password from the DB
function Password($contID, &$FirstName)
{
    $dsn = 'sqlsrv:Server=agilebob.database.windows.net;Database=bob';
    $uname = 'bobadmin';
    $pwd = 'Agilebob60515';
    $options = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION);
    try {
        $db = new PDO($dsn, $uname, $pwd, $options);
        $SQL = $db->prepare("SELECT Password, fName, contId FROM tblContestants WHERE Email = :contId");
コード例 #20
0
ファイル: install.php プロジェクト: aaronboo95/chiitrans
            $pwd = get($_POST, 'db_password');
            if ($pwd != '(hidden)') {
                $db_config['password'] = $pwd;
            }
            $db_config['db'] = get($_POST, 'db_db');
            $db_config['prefix'] = get($_POST, 'db_prefix');
            if (!dbCreateConnection()) {
                throw new DBException("Cannot create DB connection.");
            }
            @mysql_query(sprintf("create database %s", mysql_real_escape_string($db_config['db'])));
            dbUpdateTableNames();
            query("drop table if exists {$table['user']}");
            query("create table {$table['user']} (\r\n                     id int auto_increment primary key,\r\n                     name varchar(100),\r\n                     password char(32),\r\n                     role varchar(100),\r\n                     comment longtext,\r\n                     admin_comment longtext,\r\n                     ban_date datetime,\r\n                     banned_by int,\r\n                     ban_reason longtext,\r\n\r\n                     unique index i_name (name)\r\n                 ) default charset='utf8'");
            query("drop table if exists {$table['ip_data']}");
            query("create table {$table['ip_data']} (\r\n                     id int auto_increment primary key,\r\n                     ip varchar(32),\r\n                     admin_comment longtext,\r\n                     ban_date datetime,\r\n                     banned_by int,\r\n                     ban_reason longtext,\r\n\r\n                     unique index i_ip (ip)\r\n                 ) default charset='utf8'");
            query("drop table if exists {$table['source']}");
            query("create table {$table['source']} (\r\n                     id int auto_increment primary key,\r\n                     source longtext,\r\n\r\n                     index i_text (source(256))\r\n                 ) default charset='utf8'");
            query("drop table if exists {$table['translation']}");
            query("create table {$table['translation']} (\r\n                     id int auto_increment primary key,\r\n                     revision int,\r\n                     revert_to int,\r\n                     source_id int,\r\n                     translation longtext,\r\n                     comment longtext,\r\n                     user_id int,\r\n                     user_ip varchar(32),\r\n                     date datetime,\r\n                     \r\n                     index i_source_id (source_id),\r\n                     index i_user_id (user_id),\r\n                     index i_user_ip (user_ip),\r\n                     unique index i_source_id_revision (source_id, revision)\r\n                 ) default charset='utf8'");
            $pwd = get($_POST, 'password');
            $pwd = md5($pwd);
            query("insert into {$table['user']} (id, name, password, role, comment, admin_comment, ban_date, banned_by, ban_reason)\r\n                values(1, ?, ?, 'root', null, null, from_unixtime(0), null, null)", $name, $pwd);
            $user = User::load(mysql_insert_id());
            dbSaveConfig();
            $doc->content = "\r\n                <h1>Installation complete</h1>\r\n                <p>Installation completed successfully. Please delete file <b>install.php</b> from the server.</p>\r\n                <p><a href='index.php'>Go to main page</a></p>\r\n            ";
        } catch (DBException $ex) {
            showForm($name, "Database error: " . $ex->getMessage());
        }
    }
}
echo $doc->render();
コード例 #21
0
ファイル: projects.php プロジェクト: DanFGit/cms-phil
    } elseif (isset($_GET['id'])) {
        /* SPECIFIC PROJECT VIEW
         * get project info
         * input values into form
         */
        $sql = "SELECT * FROM projects WHERE id=:id";
        try {
            $stmt = $db->prepare($sql);
            $stmt->bindParam(':id', $_GET['id'], PDO::PARAM_STR);
            $stmt->execute();
        } catch (PDOException $e) {
            echo "<div class='adminnotice'><span class='notice'>Could not fetch post: " . $e->getMessage() . "</span></div>";
        }
        if ($stmt->rowCount() == 1) {
            $result = $stmt->fetch(PDO::FETCH_ASSOC);
            showForm($me['colour'], $result['title'], $result['summary'], $result['content'], $result['image']);
        } else {
            echo "<div class='adminnotice'><span class='notice'>No such post with id " . $_GET['id'] . ".</span></div>";
        }
    } else {
        //show list of projects
        //allow new project addition (hidden by default)
        $sql = "SELECT * FROM projects";
        ?>
<div class="adminnotice"><?php 
        try {
            $stmt = $db->prepare($sql);
            $stmt->execute();
            echo "<span class='notice'>Below is a list of posts displayed on the site. You can edit, delete, and hide them from this page.</span>";
        } catch (PDOException $e) {
            echo "<div class='adminnotice'><span class='notice'>Could not fetch post list: " . $e->getMessage() . "</span></div>";
コード例 #22
0
ファイル: fpostit.php プロジェクト: ZerGabriel/friendica
        curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
        $c_result = curl_exec($c);
        if (curl_errno($c)) {
            $error = curl_error($c);
            showForm($error, $content);
        }
        curl_close($c);
        if (!isset($error)) {
            echo '<script language="javascript" type="text/javascript">window.close();</script>';
        }
    } else {
        $error = "Missing account name and/or password...try again please";
        showForm($error, $content);
    }
} else {
    showForm(null, $content);
}
function showForm($error, $content)
{
    $username_cookie = $_COOKIE['username'];
    $password_cookie = $_COOKIE['password'];
    echo <<<EOF
\t<div class='wrap1'>
\t\t<h2><img class='logo' src='friendica-32.png' align='middle';/>
\t\tFriendica Bookmarklet</h2>
\t</div>

\t<div class="wrap2">
\t\t<form method="post" action="{$_SERVER['PHP_SELF']}">
\t\t\tEnter the email address of the Friendica Account that you want to cross-post to:(example: user@friendica.org)<br /><br />
\t\t\tAccount ID: <input type="text" name="friendica_acct_name" value="{$username_cookie}" size="50"/><br />
コード例 #23
0
                    $sql .= ") values (";
                    $sql .= "'{$idUsuario}','{$idPermiso}'";
                    $sql .= ")";
                    $db->query($sql);
                    //echo "$sql <br>";
                }
            }
            showForm($idUsuario);
            break;
        case "del":
            foreach ($arrRel as $idRelUsrPerm) {
                $sql = "delete from REL_USR_PERM where id_rel_usr_perm='{$idRelUsrPerm}' ";
                $db->query($sql);
                //echo "$sql <br>";
            }
            $sql = "select * from USUARIO where id_usuario='{$idUsuario}'";
            $db->query($sql);
            while ($db->next_record()) {
                $form[nombre] = $db->f(nombre);
                $form[login] = $db->f(login);
                $form[password] = $db->f(Password);
                $form[idOficina] = $db->f(id_oficina);
                $form[idUsuario] = $idUsuario;
            }
            showForm($idUsuario);
            break;
    }
} else {
    $t->set_file("page", "accesoDenegado.html");
    $t->pparse("out", "page");
}
コード例 #24
0
if (!isset($_SESSION['LoggedInCustID'])) {
    if (empty($_GET["txtCustomerID"])) {
        showForm();
        exit;
    } else {
        $CustomerID = $_GET["txtCustomerID"];
    }
    if (empty($_GET["txtPassword"])) {
        showForm();
        exit;
    } else {
        $PasswordForm = $_GET["txtPassword"];
    }
    //Validate password
    if ($PasswordForm != Password($CustomerID, $FirstName)) {
        showForm("Invalid password");
        exit;
    }
    setcookie('FirstName', $FirstName, strtotime('+1 week'), "/500141777");
    $_SESSION['LoggedInCustID'] = $CustomerID;
}
function Password($CustomerID, &$FirstName)
{
    $dsn = 'mysql:host=itsql.fvtc.edu;dbname=31845_500141777';
    $username = '******';
    $password = '******';
    try {
        $options = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION);
        //Associative array
        $db = new PDO($dsn, $username, $password, $options);
        //PDO object to create the connection to the server and DB
コード例 #25
0
} else {
    $postVars = $_POST;
    if ($_REQUEST['posted'] == 'media_change') {
        require_once "../shared/logincheck.php";
        showForm($postVars);
    } else {
        $restrictInDemo = true;
        require_once "../shared/logincheck.php";
        $biblio = postVarsToBiblio($postVars);
        $pageErrors = array();
        if (!$biblio->validateData()) {
            $pageErrors = array_merge($pageErrors, biblioToPageErrors($biblio));
        }
        $pageErrors = array_merge($pageErrors, customFieldErrors($biblio));
        if (!empty($pageErrors)) {
            showForm($postVars, $pageErrors);
        } else {
            $bibid = insertBiblio($biblio);
            $msg = $loc->getText("biblioNewSuccess");
            header("Location: ../shared/biblio_view.php?bibid=" . U($bibid) . "&msg=" . U($msg));
        }
    }
}
function postVarsToBiblio($post)
{
    require_once "../classes/Biblio.php";
    require_once "../classes/BiblioField.php";
    $biblio = new Biblio();
    $biblio->setMaterialCd($post["materialCd"]);
    $biblio->setCollectionCd($post["collectionCd"]);
    $biblio->setCallNmbr1($post["callNmbr1"]);
コード例 #26
0
                $paramToPass['reason'] = $selectRow['reason'];
            }
            showForm("Edit", "Error Occurred!", $paramToPass);
        }
    } else {
        if (trim(addslashes($_POST["ip"])) == "") {
            $paramToPass = array();
            $selectQry = "select * from ipRules where id=" . trim(addslashes($_POST['id']));
            $selectRes = mysql_query($selectQry);
            $selectRow = mysql_fetch_assoc($selectRes);
            if (mysql_num_rows($selectRes) > 0) {
                $paramToPass['id'] = $selectRow['id'];
                $paramToPass['ip'] = $selectRow['ip'];
                $paramToPass['reason'] = $selectRow['reason'];
            }
            showForm("Edit", "Ip cann't be Null", $paramToPass);
            ?>
		<script>
		//	 parent.location.reload(true);
		</script>
	<?php 
        }
    }
}
function showForm($mode, $msg, $params = array())
{
    ?>
			
			<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
			<html xmlns="http://www.w3.org/1999/xhtml">
			<head>
コード例 #27
0
ファイル: delect.php プロジェクト: jwatphisit/Web2
  	<li><a href="showdata.php">Data</a></li>
  	<li><a href="addcountry.php">Add the country</a></li>
  	<li><a href="add.php">Add the player</a></li>
  	<li><a href="delect.php">Delect the player</a></li>
  	<li><a href="Data.php">Reset the database</a><li>
	</ul> 
	</div>
</div>

<?php 
//Connect to the database.
include 'connect.inc.php';
if (isset($_POST['submit'])) {
    processForm($connection);
} else {
    showForm($connection);
}
function showForm($connection)
{
    echo "<form action ='delect.php' method='POST'>";
    echo "<fieldset>";
    echo "<legend> Delect the Rugby Player</legend>";
    echo "<table>";
    echo "<tr><th>Delect</th><th>First Name</th><th>Last Name</th><th>Image</th><th>Position</th><th>Country Name</th></tr>";
    //Select statement.
    $queryString = "SELECT tblRugbyPlayer.ID, tblRugbyPlayer.FirstName, tblRugbyPlayer.LastName, tblRugbyPlayer.Image, tblRugbyPlayer.Position, tblCountry.CountryName FROM tblRugbyPlayer JOIN tblCountry WHERE tblRugbyPlayer.CountryCode = tblCountry.CountryCode";
    $result = mysqli_query($connection, $queryString);
    while ($row = mysqli_fetch_assoc($result)) {
        echo "<tr>";
        foreach ($row as $key => $value) {
            if ($key == "ID") {
コード例 #28
0
ファイル: new.php プロジェクト: DanFGit/cms-phil
        $sql = "INSERT INTO projects (title, summary, image, content) VALUES\n                  (:title, :summary, :image, :content)";
        try {
            $stmt = $db->prepare($sql);
            $stmt->bindParam(':title', $_POST['title'], PDO::PARAM_STR);
            $stmt->bindParam(':summary', $_POST['summary'], PDO::PARAM_STR);
            $stmt->bindParam(':image', $_POST['image'], PDO::PARAM_STR);
            $stmt->bindParam(':content', $_POST['content'], PDO::PARAM_STR);
            $stmt->execute();
        } catch (PDOException $e) {
            echo 'Insert failed: ' . $e->getMessage();
        }
        if ($stmt->rowCount() == 1) {
            echo "Success.";
            ?>
<meta http-equiv="refresh" content="0;projects.php"><?php 
        } else {
            echo "Insert Failed.";
        }
    } else {
        showForm($me['colour']);
    }
} else {
    // NO ADMIN LOGGED IN
    echo "You shouldn't be here.";
}
//end login check
?>
    </div>
  </body>
</html>
コード例 #29
0
ファイル: catUsuario.php プロジェクト: nesmaster/lition
            // Detectar el perfil.
            $txPerm = "";
            $sql2 = "select id_permiso from REL_USR_PERM where id_usuario='{$idUsuario}'";
            $db2->query($sql2);
            while ($db2->next_record()) {
                $idPermiso = $db2->f(id_permiso);
                $permiso = getValueTable("permiso", "PERMISO", "id_permiso", $idPermiso);
                $txPerm .= $permiso . ",";
            }
            $t->set_var(array("PERFIL" => $txPerm, "USUARIO" => $usuario, "LOGIN" => $login, "NAVIERA" => $naviera, "OFICINA" => $oficina, "EDITAR" => "<a href=\"javascript:ventanaNueva('catUsuarioCaptura.php?idReg={$idUsuario}',400,400)\">Editar</a>", "CAMBIO_PASS" => "<a href=\"javascript:ventanaNueva('catUsuarioChgPas.php?idReg={$idUsuario}',400,400)\">Password</a>"));
            $t->parse("lnTupla", "blqTupla", true);
        }
        $control = $paging->print_link();
        $t->set_var("CONTROL", $control);
        $t->pparse("out", "page");
    }
    /*ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff*/
    /*----------------------------------------------------------------*/
    switch ($modo) {
        case "consulta":
            showForm();
            break;
        default:
            $data[keyword] = $keyword;
            showForm($data);
            break;
    }
} else {
    $t->set_file("page", "accesoDenegado.html");
    $t->pparse("out", "page");
}
コード例 #30
0
ファイル: index.php プロジェクト: sushritcode/emsrepo
require_once DBS_PATH . 'objDataHelper.php';
require_once INCLUDES_PATH . 'schedule_function.inc.php';
require_once INCLUDES_PATH . 'api_function.inc.php';
require_once INCLUDES_PATH . 'common_function.inc.php';
require_once INCLUDES_PATH . 'utilities.php';
$CONST_MODULE = 'join';
$CONST_PAGEID = 'Join Meeting';
$strMID = trim($_REQUEST["MID"]);
//MID
//$strSCID = trim($_REQUEST["SCID"]);   //schedule_id
//$strEMID = trim($_REQUEST["EMID"]);   //email_address
//$strPSCD = trim($_REQUEST["PSCD"]);   //passcode
//$strPRID = trim($_REQUEST["PRID"]);   //protocol id
//$strResponse = verifyScheduleInvite($strMID, $strSCID, $strEMID, $strPSCD, $strPRID, $objDataHelper);
$strResponse = verifyScheduleInvite($strMID, $objDataHelper);
showForm($strResponse, $objDataHelper);
exit;
function showForm($strResponse, $objDataHelper)
{
    $arrResult = explode(SEPARATOR, $strResponse);
    //    echo "<pre>";
    //    print_r($arrResult);
    //    echo "<pre>";
    $STATUS = trim($arrResult[0]);
    //status of verification
    $MESG = trim($arrResult[1]);
    //message from verification if any
    $SCH_ID = trim($arrResult[2]);
    //schedule_id
    $SCH_STATUS = trim($arrResult[3]);
    //schedule_status