コード例 #1
0
ファイル: sticker.php プロジェクト: hSATAC/gfx.tw
 function index()
 {
     $this->load->helper('gfx');
     if (!checkAuth(false, false, 'flashdata')) {
         header('Location: ' . base_url());
         return;
     }
     $user = $this->db->query('SELECT * FROM users WHERE `id` = ' . $this->session->userdata('id') . ' LIMIT 1');
     if ($user->num_rows() === 0) {
         //Rare cases where session exists but got deleted.
         session_data_unset(false);
         flashdata_message('no_such_user');
         header('Location: ' . base_url());
         return;
     }
     $U = $user->row_array();
     $user->free_result();
     $F = array();
     for ($i = 0; $i < 3; $i++) {
         $feature = $this->db->query('SELECT name, title, description FROM features ' . 'WHERE `id` = ' . $U['feature_' . $i] . ';');
         $F[] = $feature->row_array();
         $feature->free_result();
     }
     unset($feature);
     if ($U['ready'] !== 'Y') {
         flashdata_message('sticker_nopage');
         header('Location: ' . site_url('editor'));
         return;
     }
     $data = array('meta' => $this->load->view('sticker/meta.php', $U, true), 'content' => $this->load->view('sticker/content.php', array_merge($U, array('features' => $F)), true), 'db' => 'content ');
     $this->load->library('parser');
     $this->parser->page($data, $this->session->userdata('id'), $U);
 }
コード例 #2
0
ファイル: auth.php プロジェクト: CMP-Studio/EmuObjectMover
function getAccount()
{
    if (checkAuth()) {
        return $_SESSION["auth_account_id"];
    }
    return null;
}
コード例 #3
0
function checkLogin(&$USERLOGGEDIN)
{
    require_once "auth.lib.php";
    $userid = checkAuth();
    if ($userid != 0) {
        setAuth($userid);
        updateUserLogin($userid);
        $USERLOGGEDIN = true;
    }
}
コード例 #4
0
ファイル: index.php プロジェクト: enikesha/v_order
function route_deposit()
{
    global $PMC;
    $member = checkAuth();
    set('member', $member);
    set('deposit', $PMC->get("dep{$member['id']}"));
    global $page;
    ob_start();
    include 'templates/deposit.php';
    set('content', ob_get_clean());
    include 'templates/_layout.php';
}
コード例 #5
0
ファイル: Welcome.php プロジェクト: vslala/cg
 public function __construct()
 {
     parent::__construct();
     $this->load->helper('form');
     $this->load->helper('html_helper');
     $this->load->helper('url_helper');
     $this->load->library('session');
     $this->load->model('auth_model');
     $this->load->helper('cookie');
     checkAuth();
     $this->checkRemember();
 }
コード例 #6
0
ファイル: index.php プロジェクト: berejant/spkneu-mbti
function checkAdminAuth()
{
    if (!checkAuth()) {
        return false;
    }
    global $session, $app;
    if ('admin' !== $session->getUserType()) {
        Helpers::sendJson(array('error' => array('error_code' => 'forbidden', 'error_msg' => 'Доступ мають лише адміністратори')));
        return false;
    }
    return true;
}
コード例 #7
0
ファイル: about.php プロジェクト: hSATAC/gfx.tw
 function delete()
 {
     $this->load->config('gfx');
     $this->load->helper('gfx');
     if (!checkAuth(true, true, 'flashdata')) {
         header('Location: ' . site_url('about'));
         return;
     }
     $this->load->database();
     $this->db->delete('aboutpages', array('id' => $this->input->post('id')));
     flashdata_message('about_deleted', 'highlight', 'info');
     header('Location: ' . site_url('about'));
 }
コード例 #8
0
ファイル: function.php プロジェクト: quguo/wxpt
function getChild($data, $pid)
{
    $child = array();
    foreach ($data as $key => $vo) {
        if ($vo['pid'] == $pid) {
            $url = $vo['m'] . "/" . $vo['c'] . "/" . $vo['a'];
            $vo['url'] = U($url);
            $vo['auth'] = checkAuth($url);
            //echo $url."<br>";
            $child[] = $vo;
        }
    }
    return $child;
}
コード例 #9
0
ファイル: piProcessing.php プロジェクト: saurabhsrb/pipress
function piRequest($code, $method)
{
    global $verbose;
    // Requires auth
    checkAuth();
    $code["function"] = "/" . str_replace(".", "/", $code["function"]);
    if ($verbose) {
        echo $code["function"] . "\n";
    }
    $endpoint = endpointWith($code["function"], $method);
    if ($endpoint === false) {
        return json_encode(sendRequest($method, defaultHeader(), $code["arguments"], $code["function"]));
        //return false;
    }
    if ($method != "GET") {
        $data = formattedParametersWithData($endpoint, $data);
    }
    $newPath = fillEndpointPathWithRequirements($endpoint, $code["arguments"]);
    $code["arguments"] = cleanEndpointRequirementsFromData($endpoint, $code["arguments"]);
    return json_encode(sendRequest($method, defaultHeader(), $code["arguments"], $newPath));
}
コード例 #10
0
ファイル: voicemail.php プロジェクト: andreikabeliy/yate
                    $text = $ev->GetValue("text");
                    for ($i = 0; $i < strlen($text); $i++) {
                        gotDTMF($text[$i]);
                    }
                    $ev->handled = true;
                    break;
            }
            /* This is extremely important.
               We MUST let messages return, handled or not */
            if ($ev) {
                $ev->Acknowledge();
            }
            break;
        case "answer":
            // Yate::Debug("PHP Answered: " . $ev->name . " id: " . $ev->id);
            if ($ev->name == "user.auth") {
                checkAuth($ev->retval);
            }
            break;
        case "installed":
            // Yate::Debug("PHP Installed: " . $ev->name);
            break;
        case "uninstalled":
            // Yate::Debug("PHP Uninstalled: " . $ev->name);
            break;
        default:
            // Yate::Output("PHP Event: " . $ev->type);
    }
}
Yate::Output("PHP: bye!");
/* vi: set ts=8 sw=4 sts=4 noet: */
コード例 #11
0
ファイル: feature.php プロジェクト: hSATAC/gfx.tw
 function update()
 {
     $this->load->config('gfx');
     $this->load->helper('gfx');
     if (!checkAuth(true, true, 'json')) {
         return;
     }
     /* Feature name cannot collide function name */
     if (in_array($this->input->post('name'), array('update', 'delete'))) {
         json_message('error_feature_name');
         return;
     }
     /* Check whether name already used */
     $data = $this->db->query('SELECT `name` FROM `features` WHERE `id` != ' . $this->input->post('id') . ' AND `name` = ' . $this->db->escape($this->input->post('name')) . ';');
     if ($data->num_rows() !== 0) {
         json_message('dup_feature_name');
         return;
     }
     $data->free_result();
     /* Update stickers*/
     $this->_update_feature_images($this->input->post('title'), $this->input->post('name'));
     /* Update data */
     $this->db->update('features', array('title' => $this->input->post('title'), 'name' => $this->input->post('name'), 'order' => $this->input->post('order'), 'description' => $this->input->post('description'), 'content' => $this->input->post('content')), array('id' => $this->input->post('id')));
     $this->load->library('cache');
     $this->cache->remove($this->input->post('name'), 'feature-inframe');
     $this->cache->remove($this->input->post('name'), 'feature');
     json_message('feature_updated', 'highlight', 'info');
 }
コード例 #12
0
<?php

include "_header.php";
?>

<?php 
checkAuth('http://web.engr.oregonstate.edu/~dicarloj/Nakama/invalid_key.php', 1);
?>

<?php 
if (isset($_POST["password"])) {
    ///rerrorcheck password and password2
    $password = $_POST["password"];
    /*	&userID = $_SESSION["userID"];
    	if($result = $mysqli->query("select userName,password from Users wheren userID = '$userID'")){//////////dont need this use email
    		$obj = $result->fetch_object();
    		$username = $obj->userName;
    		$hashedPassword = base64_encode(hash('sha256',$password . $username));
    	///set password to hashpassword in Users where userID = $user ID 
    		echo 'Your password has been changed';
    		$result->close();
    	}*/
}
echo 'hi';
?>

<?php 
include "_footer.php";
コード例 #13
0
ファイル: employee-rost.php プロジェクト: anjijava16/mis_Imp
<?php

require_once "../pos-dbc.php";
require_once "../functions.php";
checkAuth(120);
error_reporting(E_ALL ^ E_WARNING ^ E_NOTICE ^ E_DEPRECATED);
?>

<link rel="stylesheet" type="text/css" href="../style.css" />
<link rel="stylesheet" type="text/css" href="../invoice.css" />
<link rel="stylesheet" type="text/css" href="../js/jquery.ui.datepicker.css" />
<script type="text/javascript" src="../js/jquery-lastest.js"></script>
<script type="text/javascript" src="../js/jquery.ui.datepicker.js"></script>
<script>
	jQuery(document).ready(function($) {
		$('#date1').datepicker({
			changeYear: true, 
			dateFormat: "dd/mm/yy",
			onSelect: function (selectedDateTime){
				var start = $(this).datepicker('getDate');
				$('#date2').datepicker('option', 'minDate', new Date(start.getTime()));
				var next = new Date(start.getFullYear(),start.getMonth()+1,start.getDate()+6)
				var day = next.getDate();
					day = day<10? '0'+day : day;
				var mon = next.getMonth();
					mon = mon<10? '0'+mon : mon;
				$('#date2').val(day+'/'+mon+'/'+next.getFullYear());
				document.location.href = reloc_href();
			}
		});
		$('#date2').datepicker({
コード例 #14
0
ファイル: index.php プロジェクト: lyhiving/shortURL-1
<?php

define('SU_RUN', 0);
include_once '../config.php';
include_once '../constant.php';
include_once '../dbconn.php';
include_once '../function.php';
define('UID', checkAuth());
if (!(getUserFlag() & SU_USER_OPS)) {
    header('HTTP/1.1 403 Forbidden');
    header('location: ' . SU_BASE_URL);
    return;
}
$opLevel = getUserFlag() & SU_USER_OPS;
?>
<!DOCTYPE html>
<html>
    <head>
        <title>URL Shorterner</title>
        <link rel="stylesheet" href="includes/jquery-ui.css">
        <script type="text/javascript" src="includes/jquery-2.0.3.js"></script>
        <script type="text/javascript" src="includes/jquery-ui.js"></script>
    </head>
    <body>
        <a href="<?php 
echo SU_BASE_URL;
?>
">Return to main user interface</a>
        <h1>Select Admin Function</h1>
        <ul>
            <?php 
コード例 #15
0
ファイル: profile.php プロジェクト: matthewrsj/jedi-temple
} else {
    $page = 1;
}
$start_from = ($page - 1) * $num_rec_per_page;
$query = "SELECT articles.title, articles.url, articles.user_id, articles.id, articles.category_id,\n                articles.midichlorians, users.username, categories.name, articles.time_submitted\n                FROM articles, users, categories\n                WHERE articles.user_id = users.id AND articles.category_id = categories.id AND users.username = '******'\n                ORDER BY articles.time_submitted DESC\n                LIMIT {$start_from}, {$num_rec_per_page}";
$articles = mysql_query($query);
while ($row = mysql_fetch_array($articles)) {
    //Sanatize outputs from html/javascript injection
    $id = htmlspecialchars($row["id"]);
    $url = htmlspecialchars($row["url"]);
    $title = htmlspecialchars($row["title"]);
    $midichlorians = htmlspecialchars($row["midichlorians"]);
    $username = htmlspecialchars($row["username"]);
    $name = htmlspecialchars($row["name"]);
    echo "\n           <a class='list-group-item' id='article" . $id . "' href='" . $url . "'>\n              <h6 class='list-group-item-heading'><b>" . $title . " </b></h6>" . "<p class='list-group-item-text'>User: "******"<br>Category: " . $name . "</p><p class='list-group-item-text'>Midichlorians: <span class='badge'>" . $midichlorians . "</span></p></a>\n              ";
    if (checkAuth(false) != "") {
        echo "\n              <div class='form-group'>\n                <button class='btn btn-default' type='upvote' onclick='upvote(" . $id . ");' name='upvote' style='color:green; font-weight:bold'> + </button>\n                <button class='btn btn-default' type='downvote' onclick='downvote(" . $id . ");' name='downvote' style='color:red; font-weight:bold'> - </button>\n              </div>\n                ";
    } else {
        echo "Log in to vote on this article.\n                ";
    }
}
?>
		</div>
</div><!-- / main list group -->
    <div class="row">
    <nav>
        <ul class = "pagination">
<?php 
$num_rec_per_page = 5;
$mysql_handle = mysql_connect($dbhost, $dbuser, $dbpass) or die("Error connecting to database server");
mysql_select_db($dbname, $mysql_handle) or die("Error selecting database: {$dbname}");
コード例 #16
0
ファイル: _header.php プロジェクト: IanMage1/WhiteSpace
?>
<head>
	<link rel="stylesheet" type="text/css" href="CSS/newstyle.css">
	<script src="JS/jquery-1.12.0.js"></script>
	<script src="JS/jquery-ui-1.11.4/jquery-ui.js"></script>
</head>

<body>
	<header>
		<img src="Images/WS_Alpha.png" id="logo"></img>
	
		<nav>
			<ul id="menu">
				<li><a href="index.php">Home</a>
				<?php 
if (checkAuth(false) == "") {
    ?>
				<li><a href="add_user.php">Register</a>
				<li><a href="login.php">Login</a>
				<li><a href="leaderboard.php">Leaderboard</a>
				<?php 
} else {
    ?>
				<li><a href="logout.php?cb=<?php 
    echo microtime(true);
    ?>
?sendBackTo=<?php 
    $currentUrl;
    ?>
">Logout</a>
				<li><a href="leaderboard.php">Leaderboard</a>
コード例 #17
0
ファイル: apply-payment.php プロジェクト: anjijava16/mis_Imp
<?php

require '../pos-dbc.php';
require_once "../functions.php";
checkAuth();
error_reporting(E_ALL ^ E_WARNING ^ E_NOTICE ^ E_DEPRECATED);
$id = intval($_POST['id']);
$payment = mysql_real_escape_string($_POST['payment']);
$result = mysql_query("SELECT * FROM invoices WHERE id = {$id};") or die(mysql_error());
$response = new stdClass();
if (mysql_num_rows($result) == 0) {
    $response->error = 'The invoice did not find';
    echo json_encode($response);
    exit;
}
$row = mysql_fetch_assoc($result);
$cust = mysql_query("SELECT * FROM customer WHERE id = {$row['customer_id']};") or die(mysql_error());
$custRow = mysql_fetch_assoc($cust);
//$customer_balance = $custRow['customer_balance'] + $row['total'];
$customer_balance = $custRow['customer_balance'];
if ($customer_balance < 0) {
    $customer_balance = 0;
}
mysql_query("UPDATE customer SET customer_balance = {$customer_balance} WHERE id = {$row['customer_id']};") or die(mysql_error());
//mysql_query("UPDATE invoices SET paid = 'yes', payment = '{$payment}' WHERE id = {$row['id']};") or die(mysql_error());
$partial = $row['total'] - $row['balance'];
mysql_query("UPDATE invoices SET paid = 'yes', payment = '{$payment}', partial = '{$partial}' WHERE id = {$row['id']};") or die(mysql_error());
$response->response = 'ok';
echo json_encode($response);
exit;
コード例 #18
0
require_once BASE_PATH . '/lib/sitemap.php';
// Set default variables
$do = getGETparam4IdOrNumber('do');
$status = getGETparam4IdOrNumber('status');
$status_message = getGETparam4DisplayHTML('msg');
// Open recordset for specified user
$userID = getGETparam4Number('userID');
if ($userID > 0) {
    $row = $db->SelectSingleRow($cfg['db_prefix'] . 'users', array('userID' => MySQL::SQLValue($userID, MySQL::SQLVALUE_NUMBER)));
    if (!$row) {
        $db->Kill($ccms['lang']['system']['error_general']);
    }
} else {
    die($ccms['lang']['system']['error_general']);
}
if (isset($_SESSION['rc1']) && !empty($_SESSION['rc2']) && checkAuth()) {
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
	<title>Edit users</title>
	<link rel="stylesheet" type="text/css" href="../../../../admin/img/styles/base.css,liquid.css,layout.css,sprite.css,last_minute_fixes.css" />
	<!--[if IE]>
		<link rel="stylesheet" type="text/css" href="../../../../admin/img/styles/ie.css" />
	<![endif]-->
</head>
<body>
	<div class="module" id="edit-user-details">

		<?php 
コード例 #19
0
ファイル: index2.php プロジェクト: eharmon/yelly
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with lylina; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

require_once('../conf.php');
require_once('../inc/common.php');
require_once('../inc/auth.php');

if(!isset($conf))
	$conf = array();
else {
	$UID = checkAuth($_REQUEST);
	if($UID != 1)
		die('Sorry, you cannot reconfigure lylina');
}
	
doHeader();

if($_REQUEST['do'] == 'write')
	setPrefs();
else
	readPrefs();
	
doFooter();

function doHeader() {
?>
コード例 #20
0
ファイル: ajax.php プロジェクト: lyhiving/shortURL-1
{"Code":403,"Info":"You have to login first"}
}
<?php 
        return;
    }
    #check old password
    $stmt = $db->prepare('SELECT * FROM ' . SU_TABLE_USER . ' WHERE `uid`=?;');
    $stmt->execute(array(checkAuth()));
    $ok = false;
    if ($stmt->rowCount() == 1) {
        $row = $stmt->fetch(PDO::FETCH_ASSOC);
        if (password_verify($_POST['old'], $row['password'])) {
            $ok = true;
        }
    }
    if (!$ok) {
        ?>
{"Code":403,"Info":"Incorrect password"}

<?php 
        return;
    }
    #update password
    $hash = password_hash($_POST['new'], PASSWORD_DEFAULT);
    $stmt = $db->prepare('UPDATE ' . SU_TABLE_USER . ' SET `password`=? WHERE `uid`=?');
    $stmt->execute(array($hash, checkAuth()));
    ?>
{"Code":200,"Info":"Password updated"}
<?php 
    return;
}
コード例 #21
0
ファイル: index.php プロジェクト: GerHobbelt/CompactCMS
*/
if (!defined('CCMS_PERFORM_MINIMAL_INIT')) {
    define('CCMS_PERFORM_MINIMAL_INIT', true);
}
// Compress all output and coding
header('Content-type: text/html; charset=UTF-8');
// Define default location
if (!defined('BASE_PATH')) {
    $base = str_replace('\\', '/', dirname(dirname(__FILE__)));
    define('BASE_PATH', $base);
}
// Include general configuration
/*MARKER*/
require_once BASE_PATH . '/lib/sitemap.php';
/* make darn sure only authenticated users can get past this point in the code */
if (empty($_SESSION['ccms_userID']) || empty($_SESSION['ccms_userName']) || !checkAuth()) {
    // this situation should've caught inside sitemap.php-->security.inc.php above! This is just a safety measure here.
    die_with_forged_failure_msg(__FILE__, __LINE__);
    // $ccms['lang']['auth']['featnotallowed']
}
$status = getGETparam4IdOrNumber('status');
$status_message = getGETparam4DisplayHTML('msg');
// Get the number of users; this is used to dimension some user management window(s); also count INactive users!
$user_count = $db->SelectSingleValue($cfg['db_prefix'] . 'users', null, 'COUNT(userID)');
if ($db->ErrorNumber()) {
    $db->Kill();
}
$total_page_count = $db->SelectSingleValue($cfg['db_prefix'] . 'pages', null, 'COUNT(page_id)');
if ($db->ErrorNumber()) {
    $db->Kill();
}
コード例 #22
0
ファイル: account.php プロジェクト: raydouglass/synccit
 } else {
     if ($mode == "login") {
         // this will be really close to addauth
         // basically want loginhash, not authcode
         // login hash will be longer than auth hash. users aren't having to enter it
         $password = $json["password"];
         $r = addLogin($username, $password, $developer);
         if ($r["success"] == "") {
             xerror($r["error"], "json");
         } else {
             xlogin($r["success"], "json");
         }
         // this will probably be the same
     }
 }
 $authinfo = checkAuth($username, $login, "json");
 if ($mode == "delete") {
     $updates = array();
     foreach ($json["devices"] as $link) {
         $updates[$i++] = $link["id"];
     }
     //insertLinks($updates, $developer, $authinfo["userid"], $authinfo["device"]);
     deleteAuth($updates, $authinfo["userid"], $username);
     xsuccess(count($updates) . " links updated", "json");
 } else {
     if ($mode == "history") {
         $result = readHistory($authinfo["userid"], "json");
         echo $result;
         die;
     } else {
         if ($mode == "devices") {
コード例 #23
0
ファイル: formReceive.php プロジェクト: dmkato/CS290
<?php

$headerTitle = "The Oregon State Book Exchange || Textbook Recieved!";
include "_header.php";
$uid = checkAuth(true);
if ($stmt = $mysqli->prepare("insert into tbList(tbTitle,tbAuthor,isbn,crn,userName,date,location) values(?,?,?,?,?,?,?)")) {
    //Set Vars
    $tbTitle = $_REQUEST["tbTitle"];
    $tbAuthor = $_REQUEST["tbAuthor"];
    $isbn = $_REQUEST["isbn"];
    $crn = $_REQUEST["crn"];
    $date = date("m/d");
    $location = $_REQUEST["location"];
    /* Bind parameters to prepared statement */
    $stmt->bind_param("ssiisss", $tbTitle, $tbAuthor, $isbn, $crn, $uid, $date, $location);
    $stmt->execute();
    $stmt->close();
} else {
    printf("Error: %s\n", $mysqli->error);
}
?>

<h3>Saving your submission...</h3></br>
<div class="panel panel-default"><div class="panel-body">
<p>Thanks for posting your textbook to The Oregon State Book Exchange!</p>
<p>When someone wants to buy it, you'll recieve an email alert!</p>
</br>
<p><a href="./dataDisplay.php" role="button" class="btn btn-info">View results.</a></p>
</div></div>

コード例 #24
0
ファイル: addon.php プロジェクト: hSATAC/gfx.tw
 function forcefetch()
 {
     parse_str($this->input->server('QUERY_STRING'), $G);
     $amo_id = $this->input->post('amo_id');
     if (!$amo_id && isset($G['amo_id'])) {
         $amo_id = $G['amo_id'];
     }
     if (isset($G['sleep'])) {
         /* enable sleep to prevent DDoS AMO API */
         sleep(rand(0, 60));
     }
     if ($amo_id) {
         if (!checkAuth(true, true, 'json')) {
             return;
         }
         /* _update_amo_addon will check database id for us */
         $A = $this->_update_amo_addon($amo_id, false, false);
     } else {
         $this->load->database();
         $addon = $this->db->query('SELECT id, amo_id FROM `addons` ' . 'WHERE `amo_id` != 0 AND UNIX_TIMESTAMP(`fetched`) < ' . max(time() - $this->config->item('gfx_amo_fetch_older_than_time'), $this->config->item('gfx_amo_fetch_older_than_date')) . ' ORDER BY RAND() LIMIT 1;');
         if ($addon->num_rows() === 1) {
             $amo_id = $addon->row()->amo_id;
             $id = $addon->row()->id;
             $A = $this->_update_amo_addon($amo_id, $id, false);
         } else {
             $A = array();
         }
     }
     if (!$A) {
         /* fetch failed, output id information */
         $jsonObj = array('addons' => array(), 'fetchfailed' => array());
         if (isset($amo_id)) {
             $jsonObj['fetchfailed']['amo_id'] = $amo_id;
         }
         if (isset($id)) {
             $jsonObj['fetchfailed']['id'] = $id;
         }
     } else {
         $jsonObj = array('addons' => $A);
     }
     $this->load->view('json.php', array('jsonObj' => $jsonObj));
 }
コード例 #25
0
/*
We're only processing form requests / actions here, no need to load the page content in sitemap.php, etc.
*/
if (!defined('CCMS_PERFORM_MINIMAL_INIT')) {
    define('CCMS_PERFORM_MINIMAL_INIT', true);
}
// Define default location
if (!defined('BASE_PATH')) {
    $base = str_replace('\\', '/', dirname(dirname(dirname(dirname(dirname(__FILE__))))));
    define('BASE_PATH', $base);
}
// Include general configuration
/*MARKER*/
require_once BASE_PATH . '/lib/sitemap.php';
// security check done ASAP
if (!checkAuth() || empty($_SESSION['rc1']) || empty($_SESSION['rc2'])) {
    die("No external access to file");
}
$do = getGETparam4IdOrNumber('do');
$status = getGETparam4IdOrNumber('status');
$status_message = getGETparam4DisplayHTML('msg');
// Set the default template
$dir_temp = BASE_PATH . "/lib/templates/";
$get_temp = getGETparam4FullFilePath('template', $template[0] . '.tpl.html');
$chstatus = is_writable_ex($dir_temp . $get_temp);
// @dev: to test the error feedback on read-only on Win+UNIX: add '|| 1' here.
// Check for filename
if (!empty($get_temp)) {
    if (@fopen($dir_temp . $get_temp, 'r')) {
        $handle = fopen($dir_temp . $get_temp, 'r');
        // PHP5+ Feature
コード例 #26
0
    define('CCMS_PERFORM_MINIMAL_INIT', true);
}
// Compress all output and coding
header('Content-type: text/html; charset=UTF-8');
// Define default location
if (!defined('BASE_PATH')) {
    $base = str_replace('\\', '/', dirname(dirname(dirname(dirname(dirname(__FILE__))))));
    define('BASE_PATH', $base);
}
// Include general configuration
/*MARKER*/
require_once BASE_PATH . '/lib/sitemap.php';
$do = getGETparam4IdOrNumber('do');
$status = getGETparam4IdOrNumber('status');
$status_message = getGETparam4DisplayHTML('msg');
if ($perm->get('manageModBackup') <= 0 || !checkAuth()) {
    die("No external access to file");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
		<title>Back-up &amp; Restore module</title>
		<link rel="stylesheet" type="text/css" href="../../../../admin/img/styles/base.css,liquid.css,layout.css,sprite.css,last_minute_fixes.css" />
		<!--[if IE]>
			<link rel="stylesheet" type="text/css" href="../../../../admin/img/styles/ie.css" />
		<![endif]-->
	</head>
<body>
	<div id="backup-module" class="module">
コード例 #27
0
<?php

include "_header.php";
if (checkAuth(true) != "") {
    ?>

<div class="container">
	<div class="row">
		<div class="col-lg-6">
			<div class="well" background color="f8f8f8">
				<h1>Look up book</h1>
				<form method="post" action='isbn_search.php' class="inform" id="isbn_temp_form">
					<div class="form-group">
						<label for="isbn">ISBN:</label> 
						<input type="text" class="form-control" name="isbn_temp" size="35" id="isbn_temp">
					</div>
					<button type="submit" class="btn btn-default" name="submit">Search</button>
				</form>
			</div>
		</div>
	</div>
</div>

<script>
function validate() {
	var isbn = $("#isbn_temp").val();
	isbn = isbn.replace(/[^0-9]/g, "");
	if (isbn.length != 10 && isbn.length != 13) {
		$("#incorrect_length_error").remove();
		$("div.form-group").append($("<p id='incorrect_length_error' style='color: #ff0000;'>This is not a valid ISBN number!</p>"));
		return false;
コード例 #28
0
ファイル: index.php プロジェクト: amagdas/rawkets
                    checkAuth($oauth);
                } catch (OAuthException $e) {
                    // Generate a new request token
                    generateRequestToken($oauth);
                }
            }
            if (!isset($_SESSION["oauth_access_token"]) || $_SESSION["oauth_access_token"] == "") {
                // Generate a new request token
                generateRequestToken($oauth);
            }
            // Cookies detected
        } else {
            checkAuth($oauth, true);
        }
    } else {
        checkAuth($oauth);
    }
} catch (OAuthException $e) {
    //print_r($e);
}
?>
<!DOCTYPE html>

<html lang="en">

	<head>
		<title>Rawkets | A massively multiplayer game built using HTML5 canvas and WebSockets</title>
		<meta charset="utf-8">
		<meta name="description" content="Rawkets is a massively multiplayer game in which you can shoot and interact with other players, in real-time, in space! It uses the latest Web technologies, including HTML5 canvas and WebSockets.">
			
		<link rel="stylesheet" href="style/reset.css">
コード例 #29
0
$k = $_REQUEST['yek'];
$v = $_REQUEST['noisreVcw'];
if ('Y' == $dbg) {
    $dbg_msg = sprintf("info: r='%s', d='%s', u='%s', k='%s', v='%s', admin='%s'<br/>", $r, $d, $u, htmlspecialchars($k), $v, $i2b2_admin);
}
if (false !== stripos($k, "password")) {
    $k = base64_encode(base64_encode($k));
}
if (false === stripos($u, "%%enCryptEd%%")) {
    $u = base64_encode($u) . "%%enCryptEd%%";
}
if ('' != $r && '' != $d && '' != $u && '' != $k && '' != $v) {
    if (false === stripos($r, "getServices")) {
        $r .= "getServices";
    }
    $i2b2_admin = checkAuth($r, $d, $u, $k, $v, $dbg);
} else {
    $i2b2_admin = 'N';
}
genJsPostNextPageFunc($r, $d, $u, $k, $v);
// to generate the javascript function postNextPage(), for 'install'
if ('Y' == $dbg) {
    $dbg_msg .= sprintf("info: debug='%s', i2b2_Admin='%s', curDir-parent='%s', wc_loc='%s'", $dbg, $i2b2_admin, dirname(__DIR__), $wc_loc);
    $dbg_msg .= sprintf("<br/>      u='%s', uDC='%s', k=%s", $u, base64_decode(substr($u, 0, strpos($u, "%%enCryptEd%%") - 1)), $k);
}
?>

<html>
<head>
 <link rel="stylesheet" type="text/css" href="style.css">
</head>
コード例 #30
0
function loginUser($client_secret, $client_id, $grant_type, $username = false, $password = false, $refresh_token = false, $response_type = false, $code = false, $redirect_uri = false)
{
    $method = "POST";
    $endpoint = endpointWith("/api/v1/token", $method);
    global $verbose;
    checkAuth();
    $data = array("client_secret" => $client_secret, "client_id" => $client_id, "grant_type" => $grant_type, "username" => $username, "password" => $password, "refresh_token" => $refresh_token, "response_type" => $response_type, "code" => $code, "redirect_uri" => $redirect_uri);
    if ($method != "GET") {
        $data = formattedParametersWithData($endpoint, $data);
    }
    $newPath = fillEndpointPathWithRequirements($endpoint, $data);
    $data = cleanEndpointRequirementsFromData($endpoint, $data);
    return sendPOST(defaultHeader(), $data, $newPath);
}