コード例 #1
0
ファイル: marks.php プロジェクト: prannayk/codefundo
<?php

require 'mysql.class.php';
if (isset($_GET)) {
    $my = new MySQL();
    $myo = new MySQLi('localhost', 'root', 'root', 'codefundo');
    $some = $_GET['title'];
    unset($_GET['title']);
    if ($my->Insert("marks", $_GET)) {
        print_r('Marks Set!');
    }
    evulato($some);
}
コード例 #2
0
ファイル: answers.php プロジェクト: prannayk/codefundo
<?php

require 'mysql.class.php';
if (isset($_POST)) {
    $my = new MySQL();
    unset($_POST['title']);
    if ($my->Insert("answers", $_POST)) {
        print_r('Answers Set!');
    }
}
コード例 #3
0
ファイル: thanks.php プロジェクト: ask2techconsulting/LAMP
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
</head>
<body>
<?php 
if (!empty($_POST["submit"])) {
    require_once "class.MySQL.php";
    $dbhost = 'localhost';
    $dbuser = '******';
    $dbpass = '';
    $dbname = 'test';
    $oMySQL = new MySQL($dbname, $dbuser, $dbpass, $dbhost);
    session_start();
    $flds = array("firstName" => $_SESSION["fname"], "lastName" => $_SESSION["lname"], "emailAddr" => $_SESSION["email"], "address1" => $_SESSION["addr1"], "address2" => $_SESSION["addr2"], "suburb" => $_SESSION["suburb"], "postcode" => $_SESSION["postcode"], "country" => $_SESSION["country"], "fb_id" => $_SESSION["fb_id"], "in_id" => $_SESSION["in_id"]);
    $oMySQL->Insert($flds, "jobapplication");
    header('Location:thanks.php');
    exit;
}
?>
<div class="container">
	<h2>Online Job Application - Confirmation</h2>
	<div class="panel panel-default">
		<div class="panel-heading">Thanks!</div>
		<div class="panel-body">
			<label for="thanks">Thank you for submitting your application. Our recruitment team will be getting in touch with you in the next coming few days.</label>
		</div>
	</div>	
</div>	
</body>
</html>
コード例 #4
0
	function Insert ($table, $data)
	{
		if (DATABASE_TYPE == "PGSQL")
		{
			return PGSQL::Insert ($table, $data);
		}
		elseif (DATABASE_TYPE == "MYSQL")
		{
			return MySQL::Insert ($table, $data);
		}
	}
コード例 #5
0
ファイル: create.php プロジェクト: prannayk/codefundo
<?php

if (isset($_POST['tit'])) {
    require "mysql.class.php";
    $mysql = new MySQL();
    $some = $_POST['tit'];
    $some2 = $_POST['count'];
    unset($_POST['count']);
    $mysql->Insert("code", $_POST);
    $my = new MySQLi('localhost', 'root', 'root', 'codefundo');
    $r = "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = 'codefundo' AND table_name = 'students'";
    $q = $my->query($r);
    $some3 = "";
    if ($q) {
        while ($var = $q->fetch_object()) {
            foreach ($var as $key => $value) {
                $some3 = $value;
            }
        }
    }
    if ($some3 == 0 || $some3 == "0") {
        $some2 = intval($some2);
        $que = "CREATE TABLE " . $some . " ( id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY";
        for ($i = 1; $i <= $some2; $i++) {
            $que = $que . ", col" . $i . " VARCHAR(10) NOT NULL";
        }
        $que = $que . ")";
        if ($my->query($que)) {
            header("Location: user.php");
        }
    }
コード例 #6
0
ファイル: deactivate.php プロジェクト: proea/IPManager.pro
require_once ENGINE_DIR . '/config/config.php';
require_once ENGINE_DIR . '/config/dbconfig.php';
require_once ENGINE_DIR . '/classes/class.mysql.php';
$dataMySQL = new MySQL();
$_dateend = date('Y-m-d', time());
$query = "SELECT * from `" . DB_PREFIX . "tvusers` WHERE status=1 AND end < '" . $_dateend . "';";
$seldata = $dataMySQL->ExecuteSQL($query);
$seldataArray = $dataMySQL->ArrayResults();
for ($i = 0; $i < count($seldataArray); $i++) {
    $lnn = array();
    $dataMySQL->ExecuteSQL("UPDATE `ip_tvusers` SET `status` =  '0' WHERE `id` =" . $seldataArray[$i]['id']);
    $lnn[] = file_get_contents("http://192.168.174.23:83/api.php?key=YT56BH3I9T7BDKJ72NG93BF73NAKGWGFHON82NA&s=deactivate&ip=" . $seldataArray[$i]['ip']);
    $lnn[] = file_get_contents("http://192.168.174.25:83/api.php?key=YT56BH3I9T7BDKJ72NG93BF73NAKGWGFHON82NA&s=deactivate&ip=" . $seldataArray[$i]['ip']);
    $content .= implode(' ', $lnn);
    $Ilog = array('login' => ADMINLOGIN, 'type' => 'success', 'action' => 'deactivation', 'message' => "АВТО-Деактивация ТВ-пользователя id" . $seldataArray[$i]['id'] . " " . $seldataArray[$i]['ip'] . " " . implode(' ', $lnn));
    if (!$dataMySQL->Insert($Ilog, DB_PREFIX . "logs")) {
        $errors[] = "Ошибка добавления лога";
    }
}
unset($seldataArray);
/*	Генерайция новой конфигурации	*/
$nameTablE_T = "ip_tvusers";
$nameTablE_U = "ip_users";
//$query="SELECT ip_tvusers.id,ip_tvusers.F,ip_tvusers.ip,ip_users.mac from ip_tvusers,ip_users WHERE ip_tvusers.status =1 AND ip_users.ip=ip_tvusers.ip ORDER BY s_net, s_ip;";
$query = "SELECT ip_tvusers.id,ip_tvusers.F,ip_tvusers.ip from ip_tvusers WHERE ip_tvusers.status =1 ORDER BY F;";
$seldata = $dataMySQL->ExecuteSQL($query);
$seldataArray = $dataMySQL->ArrayResults();
$g = '
<?php
if($_GET[\'key\']=="HLNKKE69BH7VMG3APB0NSQ8NFL5MCZ4PEM2KWLQ")
{