function _out($str) { @header('Expires: ' . @gmDate('D, d M Y h:i:s', time() + 30) . ' GMT'); @header('Content-Length: ' . strLen($str)); echo $str; exit; }
private function updateAndReturnLatestCommits() { if ($lastSavedCommit = Commit::orderBy('when', 'desc')->first()) { $url = "https://api.github.com/repos/nodejs/node/commits?per_page=25&since=" . gmDate("Y-m-d\\TH:i:s\\Z", strtotime($lastSavedCommit->created_at)); } else { $url = "https://api.github.com/repos/nodejs/node/commits?per_page=25"; } $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_USERAGENT, 'Picmonic PHP Test'); $data = curl_exec($curl); $data = json_decode($data); curl_close($curl); foreach ($data as $commitData) { $commit = new Commit(); $commit->sha = $commitData->sha; $commit->name = $commitData->commit->author->name; $commit->message = $commitData->commit->message; $commit->when = $commitData->commit->committer->date; $commit->url = $commitData->commit->url; $commit->save(); } return Commit::orderBy('when', 'desc')->take(25)->get(); }
function JPGText($str, $fontname, $fontsize, $backcol, $txtcol) { global $layout; Header("Last-Modified: " . gmDate("D, d M Y H:i:s", Time()) . " GMT"); Header("Expires: " . gmDate("D, d M Y H:i:s", Time() - 3601) . " GMT"); Header("Pragma: no-cache"); Header("Cache-control: no-cache"); Header("Content-Type: image/jpeg"); $a = ImageTTFBBox($fontsize, 0, $fontname, $str); $width = $a[2] + 4; $bla = get_maximum_height($fontname, $fontsize); $height = $bla[0] + 3; $bl = $bla[1]; $im = ImageCreate($width, $height); $bgcol = ImageColorAllocate($im, $backcol['red'], $backcol['green'], $backcol['blue']); $fgcol = ImageColorAllocate($im, $txtcol['red'], $txtcol['green'], $txtcol['blue']); if (!function_exists(imagegif)) { imageTTFText($im, $fontsize, 0, 2, $bl + $fontsize / 6 + 2, $fgcol, $fontname, $str); imagejpeg($im, "", 80); } else { ImageColorTransparent($im, $bgcol); imageTTFText($im, $fontsize, 0, 2, $bl + $fontsize / 6 + 2, $fgcol, $fontname, $str); imagegif($im); } ImageDestroy($im); }
/** * @param Metaregistrar\EPP\eppConnection $conn * @param string $domainname * @return array|null */ function checkdomainclaim($conn, $domainname) { $check = new Metaregistrar\EPP\eppLaunchCheckRequest(array($domainname)); $check->setLaunchPhase(Metaregistrar\EPP\eppLaunchCheckRequest::PHASE_CLAIMS, null, Metaregistrar\EPP\eppLaunchCheckRequest::TYPE_CLAIMS); if (($response = $conn->writeandread($check)) instanceof Metaregistrar\EPP\eppLaunchCheckResponse && $response->Success()) { //$phase = $response->getLaunchPhase(); /* @var Metaregistrar\EPP\eppLaunchCheckResponse $response */ $checks = $response->getDomainClaims(); foreach ($checks as $check) { echo $check['domainname'] . " has " . ($check['claimed'] ? 'a claim' : 'no claim') . "\n"; if ($check['claimed']) { if ($check['claim']) { if ($check['claim'] instanceof Metaregistrar\EPP\eppDomainClaim) { echo "Claim validator: " . $check['claim']->getValidator() . ", claim key: " . $check['claim']->getClaimKey() . "\n"; $tmch = new Metaregistrar\TMCH\cnisTmchConnection(true, 'settingslive.ini'); $claim = array(); $output = $tmch->getCnis($check['claim']->getClaimKey()); /* @var $output Metaregistrar\TMCH\tmchClaimData */ $claim['noticeid'] = $output->getNoticeId(); $claim['notafter'] = $output->getNotAfter(); $claim['confirmed'] = gmDate("Y-m-d\\TH:i:s\\Z"); return $claim; } else { throw new Metaregistrar\EPP\eppException("Domain name " . $check['domainname'] . " is claimed, but no valid claim key is present"); } } else { throw new Metaregistrar\EPP\eppException("Domain name " . $check['domainname'] . " is claimed, but no claim key is present"); } } } } else { echo "ERROR2\n"; } return null; }
function get_current_date() { global $current_date; if (isset($current_date)) { return $current_date; } $current_date = gmDate("Y-m-d\\TH:i:s\\Z"); return $current_date; }
function writelog($pane) { $path = dirname(__FILE__) . "/bin/logs"; $getdate = gmDate("Ymd"); $tmux = new Tmux(); $logs = $tmux->get()->write_logs; if ($logs == 1) { return "2>&1 | tee -a {$path}/{$pane}-{$getdate}.log"; } else { return ""; } }
function get_clicks_for_today($BID, $user_id = 0) { $date = gmDate(Y) . "-" . gmDate(m) . "-" . gmDate(d); $sql = "SELECT *, SUM(clicks) AS clk FROM `clicks` where banner_id='{$BID}' AND `date`='{$date}' GROUP BY banner_id"; $result = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_array($result); return $row['clk']; }
public static function getDateTime() { return gmDate('Y-m-d H:i:s'); }
if (isset($_POST['submit'])) { ini_set('magic_quotes_gpc', false); // magic quotes will only confuse things like escaping apostrophe //SiteID must also be set in the Request's XML //SiteID = 0 (US) - UK = 3, Canada = 2, Australia = 15, .... //SiteID Indicates the eBay site to associate the call with $siteID = 0; //the call being made: $verb = 'GetSellerEvents'; $detailLevel = 'ReturnAll'; $errorLanguage = 'en_US'; $site = "US"; $currency = "USD"; $country = "US"; $modTimeTo = gmDate("Y-m-d\\TH:i:s\\Z"); $modTimeFrom = gmDate("Y-m-d\\TH:i:s\\Z", time() - 3 * 24 * 60 * 60); ///Build the request Xml string $requestXmlBody = '<?xml version="1.0" encoding="utf-8" ?>'; $requestXmlBody .= '<GetSellerEventsRequest xmlns="urn:ebay:apis:eBLBaseComponents">'; $requestXmlBody .= "<RequesterCredentials><eBayAuthToken>{$userToken}</eBayAuthToken></RequesterCredentials>"; $requestXmlBody .= "<DetailLevel>{$detailLevel}</DetailLevel>"; $requestXmlBody .= "<ErrorLanguage>{$errorLanguage}</ErrorLanguage>"; $requestXmlBody .= "<Version>{$compatabilityLevel}</Version>"; $requestXmlBody .= "<ModTimeFrom>{$modTimeFrom}</ModTimeFrom>"; $requestXmlBody .= "<ModTimeTo>{$modTimeTo}</ModTimeTo>"; $requestXmlBody .= '</GetSellerEventsRequest>'; //Create a new eBay session with all details pulled in from included keys.php $session = new eBaySession($userToken, $devID, $appID, $certID, $serverUrl, $compatabilityLevel, $siteID, $verb); //send the request and get response $responseXml = $session->sendHttpRequest($requestXmlBody); if (stristr($responseXml, 'HTTP 404') || $responseXml == '') {
set_var("v_b_fecha_desde", $fecha_desde); // fecha_desde set_var("v_b_fecha_hasta", $fecha_hasta); // fecha_hasta set_var("v_b_nro_orden", $b_nro_orden); set_var("v_b_dni_remitente", $b_dni_remitente); set_var("v_b_dni_destinatario", $b_destinatario); set_var("v_sucursal", $_SESSION['sucursal']); // fecha_hasta set_var("v_total_ctacte", 0.0); // sumatoria de cta cte set_var("v_sucursal", $_SESSION['sucursal']); // sumatoria de cta cte set_var("v_vendedor", $_SESSION['usuario']); // fecha de impresion set_var("v_fecha", gmDate(" d/m/Y - H:i")); $db = conectar_al_servidor(); // Indica la cantidad de registros encontrados. //---------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------- // MUESTRA TODOS LOS REGISTROS DE LAS ENCOMIENDAS sin procesar //---------------------------------------------------------------------------------------------------- $sql = "select DISTINCT\n e.NRO_GUIA,\n\t\te.FECHA,\n\t\te.REMITENTE,\n\t\te.CUIT_ORIGEN,\n\t\te.DIRECCION_REMITENTE,\n\t\te.TEL_ORIGEN,\n\t\te.DESTINATARIO,\n\t\te.CUIT_DESTINO,\n\t\te.DIRECCION_DESTINO,\n\t\te.TEL_DESTINO,\n\t\tde.DESCRIPCION as tipo_encomienda, /* 10 */\n\t\te.PRIORIDAD,\n\t\te.FECHA_ENTREGA,\n\t\te.PRECIO,\n\t\tc.usuario AS comisionista,\n\t\te.ESTADO,\n\t\te.USUARIO,\n\t\tlr.localidad AS Localidad_remitente,\n\t\tld.localidad AS Localidad_destinatario,\n\t\tCONCAT(f.Nro_SUCURSAL,'-',f.NRO_FACTURA) AS nro_factura,\n /* indica si estamos en presencia de una encomienda adeudada por pago en destinatario */\n if( 4 in (select p.forma_pago from pagos p where p.id_encomienda=e.NRO_GUIA), 1,0) AS deuda\n\t\t\n from encomiendas AS e\n Inner Join detalle_encomiendas AS de ON (e.NRO_GUIA = de.id_encomienda)and(e.ELIMINADO='N')\n Inner Join usuarios AS c ON (c.id = de.id_comisionista)\n\t\tInner Join localidades AS lr ON (e.ID_LOCALIDAD_REMITENTE = lr.codigo)\n\t\tInner Join localidades AS ld ON (e.ID_LOCALIDAD_DESTINATARIO = ld.codigo)\n\t\tLeft Join usuarios AS u ON (e.ID_COMISIONISTA = u.id)\n\t\tLeft Join facturas AS f ON (e.ID_FACTURA = f.CODIGO)"; $res = ejecutar_sql($db, $sql . $w); $v_total = 0; //---------------------------------------------------------------------------------------------------- // Verificamos el resultado de la busqueda. //---------------------------------------------------------------------------------------------------- if (!$res) { echo $db->ErrorMsg(); die;
<?php // Version / Copyright - nicht entfernen! $mainchat_version = "Open mainChat 5.0.8 (c) by fidion GmbH 1999-2012"; $mainchat_email = "*****@*****.**"; // HTTPS ja oder nein? // if ($HTTPS=="on") { // $httpprotocol="https://"; //} else { // $httpprotocol="http://"; //} // Caching unterdrücken Header("Last-Modified: " . gmDate("D, d M Y H:i:s", Time()) . " GMT"); Header("Expires: " . gmDate("D, d M Y H:i:s", Time() - 3601) . " GMT"); Header("Pragma: no-cache"); Header("Cache-Control: no-cache"); // Variable initialisieren, einbinden, Community-Funktionen laden if (!isset($functions_init_geladen)) { require_once "functions-init.php"; } if ($communityfeatures) { require_once "functions-community.php"; } // DB-Connect, ggf. 3 mal versuchen for ($c = 0; $c++ < 3 and !isset($conn);) { if ($conn = @mysql_connect($mysqlhost, $mysqluser, $mysqlpass)) { mysql_set_charset("utf8mb4"); mysql_select_db($dbase, $conn); } } if (!isset($conn)) {
echo '<a href="lmsstatus.php">Refresh</a>' . "\n"; // echo('<a href="lmsstatus.php?autorefresh=yes">Auto Refresh</a>'."\n"); } echo '<a href="lmsstatus.php?final=yes">Final Report</a>' . "\n"; } echo ' Software=' . $_SESSION['software'] . ' version=' . $_SESSION['version']; if ($final) { echo "<p>"; } echo ' key=' . $_SESSION['cert_consumer_key']; if ($final) { echo "<p>Test Date: "; } else { echo "<br/>\n"; } echo gmDate("Y-m-d\\TH:i:s\\Z"); } else { echo "<p>This test is not yet configured.</p>\n"; exit; } load_cert_data(); if ($final) { echo '<p>Test URL: ' . $curURL . "</p>\n"; echo '<table width="70%">'; } else { echo '<p>Scroll to the bottom of this page to see the URL, Key, and Secret to use for this test.</p>' . "\n"; echo '<table>'; } echo '<tr><th width="15%">Test</th><th width="65%">Description</th><th width="20%">Result</th></tr>' . "\n"; $idno = 100; $count = 0;
<?php session_start(); include 'config.php'; ?> <!DOCTYPE html> <html> <head> <title>Team Assignment</title> </head> <body> <?php if (isset($_POST['submit'])) { $query = "set search_path=project;\n\t\t\t\tSelect H.firstname, H.lastname, S.showname, P.date\n\t\t\t\tfrom show S, timeslot T, playsheet P, host H, hostsshow HS\n\t\t\t\twhere s.category='" . $_POST['category'] . "' and s.shownumber=t.shownumber and t.playsheetnumber = p.playsheetnum and HS.shownum = s.shownumber \n\t\t\t\t\tand HS.empnum = H.enumb and p.date >= all \n\t\t\t\t\t\t(select p1.date \n\t\t\t\t\t\tfrom show S1, timeslot T1, playsheet P1 \n\t\t\t\t\t\twhere s1.category='" . $_POST['category'] . "' and s1.shownumber=t1.shownumber and t1.playsheetnumber = p1.playsheetnum and\n\t\t\t\t\t\tp1.date<'" . gmDate("Y/m/d") . "') and p.date<'" . gmDate("Y/m/d") . "';"; $result = pg_query($dbconn, $query); if (!$result) { die("error in sql query: " . pg_last_error()); } if (pg_num_rows($result) > 0) { echo "The last time a show with the \"" . $_POST['category'] . "\" category aired, it was hosted by <br>"; while ($row = pg_fetch_array($result)) { echo " - " . $row[0] . " " . $row[1] . " on the \"" . $row[2] . "\" show, the " . $row[3] . ".<br>"; } } else { echo "There are either no hosts for the \"" . $_POST['category'] . "\" category or the show for that category hasn't aired yet."; } echo '<br><br><a href="query3.php">Perform another seach.</a>'; pg_free_result($result); pg_close($dbconn); } else { ?>
<?php //This is the only variable you might need to change. $dir = "/home/httpd/html/mrtg"; //These variables can be used to change some of the colors //Colors for the log file tables $topcol = "bgcolor=#eeeeee"; $namew = "bgcolor=#f4f4f4"; $valw = "bgcolor=#ffffff"; //Background colors for alternate tables $bigback1 = "bgcolor=#EEFFFF"; $bigback2 = "bgcolor=#F2FFF2"; //Please do not edit any of the code below unless you know what your doing $version = "V 1.021"; $first = 1; $extime = gmDate("D") . "," . gmDate("d M Y H:i:s") . "GMT"; ?> <html> <head> <META HTTP-EQUIV="Refresh" CONTENT="300"> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="<?php echo $extime; ?> "> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <title>Welcome to MRTG-PHP</title> <style fprolloverstyle>A:hover {color: #33CCFF; text-decoration: underline} </style> </head>
function revoke_cert($my_serial, $my_passPhrase) { $config = $_SESSION['config']; print "<BR><b>Loading CA key...</b><br/>"; flush(); $fp = fopen($config['cakey'], "r") or die('Fatal: Unable to open CA Private Key: ' . $keyfile); $myKey = fread($fp, filesize($config['cakey'])) or die('Fatal: Error whilst reading the CA Private Key: ' . $keyfile); fclose($fp) or die('Fatal: Unable to close CA Key '); print "Done<br/><br/>\n"; print "<b>Decoding CA key...</b><br/>"; flush(); if ($privkey = openssl_pkey_get_private($myKey, $my_passPhrase) or die('Error with passphrase for CA Key.')) { print "Done\n<br>Passphrase correct<br/>\n"; } print "Revoking " . $my_serial . "<BR>\n"; $pattern = '/(\\D)\\t(\\d+[Z])\\t(\\d+[Z])?\\t([a-z0-9]+)\\t(\\D+)\\t(.+)/'; $my_index_handle = fopen($config['index'], "r") or die('Unable to open Index file for reading'); while (!feof($my_index_handle)) { $this_line = rtrim(fgets($my_index_handle)); if (preg_match($pattern, $this_line, $matches)) { if ($matches[1] == 'V' && $matches[4] == $my_serial) { $my_valid_to = $matches[2]; $my_index_name = $matches[6]; print "Found " . $my_serial . " " . $my_index_name . "<BR>\n"; } } } fclose($my_index_handle); $orig_index_line = "V\t" . $my_valid_to . "\t\t" . $my_serial . "\tunknown\t" . $my_index_name; $new_index_line = "R\t" . $my_valid_to . "\t" . gmDate("ymdHis\\Z") . "\t" . $my_serial . "\tunknown\t" . $my_index_name; $my_index = file_get_contents($config['index']) or die('Fatal: Unable to open Index File'); $my_index = str_replace($orig_index_line, $new_index_line, $my_index) or die('Unable to update Status of Cert in Index string'); file_put_contents($config['index'], $my_index); //openssl ca -revoke $config['cert_path'].$filename -keyfile $config['cakey'] -cert $config['cacert'] -config $config['config'] //openssl ca -gencrl -keyfile $config['cakey'] -cert $config['cacert'] -out $config['cacrl'] -crldays 365 -config $config['config'] $cmd = "openssl ca -gencrl -passin pass:"******" -crldays 365" . " -keyfile \"" . $config['cakey'] . "\" -cert \"" . $config['cacert'] . "\" -out \"" . $config['cacrl'] . "\" -config \"" . $config['config'] . "\""; exec($cmd, $output_array, $retval); if ($retval) { print $cmd . "\n<BR>"; print_r($output_array); print "\n<BR>"; die('Fatal: Error processing GENCRL command'); } else { print "CRL published to " . $config[cacrl] . "\n<br>"; } }
if (empty($_SESSION['username']) || empty($_POST['email'])) { echo 'Error :'; echo '<br />'; echo "You left some fields blank! <a href = '?pg=forgot'>go back and try again!</a>"; unset($_POST['replacemail1']); } else { $check = core::$sql->numRows("select Name from TB_User where StrUserID = '{$user}' and Email = '{$email}'"); if ($check !== 1) { echo 'Error :'; echo '<br />'; echo "User with following email/password doesn't exist! <a href = '?pg=forgot'>go back and try again!</a>"; unset($_POST['replacemail1']); } else { $title = "Your Email Change Link!"; $getrandom = misc::genRandomString(); $datetime = gmDate('Y-m-d H:i:s'); $content = "HolySro Email Change Link : http://holysro.com/?pg=cem&uid={$getrandom} \n Get inside to change your Email \n if you didnt request it , please ignore this mail.!"; mail($email, "[HolySro Email Change] " . $title, $content . "\nEmail sent from: www.holysro.com"); core::$sql->changeDB('acc'); $ZsCheck = core::$sql->numRows("select UserID from Email_Change where UserID = '{$user}'"); if ($ZsCheck == 1) { core::$sql->exec("update Email_Change set RandomPASS ='******' ,createtime = '{$datetime}',ipaddr = '{$_SERVER['REMOTE_ADDR']}' where UserID = '{$user}'"); } else { core::$sql->exec("insert into Email_Change(UserID,RandomPASS,createtime,ipaddr) values('{$user}','{$getrandom}','{$datetime}','{$_SERVER['REMOTE_ADDR']}')"); } echo "instructions to Email Change sent to your mailbox [ {$email} ] - please check your mailbox! <br /> In case you haven't received the email from us - check your spam folder! <br /><a href='?pg=index'>Return to main page</a>"; unset($_POST['replacemail1']); misc::redirect("?pg=news", 2); } } }
$papersize = $_REQUEST['papersize']; $renderer = $_REQUEST['renderer']; $streetIndex = $_REQUEST['streetIndex']; $featureList = $_REQUEST['featureList']; $pubs = $_REQUEST['pubs']; $restaurants = $_REQUEST['restaurants']; $fastfood = $_REQUEST['fastfood']; $hotels = $_REQUEST['hotels']; $tourism = $_REQUEST['tourism']; $leisure = $_REQUEST['leisure']; $shopping = $_REQUEST['shopping']; $banking = $_REQUEST['banking']; $libraries = $_REQUEST['libraries']; $dpi = $_REQUEST['dpi']; $markersize = $_REQUEST['markersize']; $nowStr = gmDate("Y-m-d H:i:s"); $xmlStr = "<xml>\n"; $xmlStr .= "<debug>False</debug>\n"; $xmlStr .= "<title>" . $title . "</title>\n"; $xmlStr .= "<format>" . $format . "</format>\n"; $xmlStr .= "<pagesize>" . $papersize . "</pagesize>\n"; if ($streetIndex == 'on') { $xmlStr .= "<streetIndex>True</streetIndex>\n"; } else { $xmlStr .= "<streetIndex>False</streetIndex>\n"; } if ($featureList == 'on') { $xmlStr .= "<featureList>True</featureList>\n"; } else { $xmlStr .= "<featureList>False</featureList>\n"; }
} elseif ($dataset === 'avgdur') { $db = @gs_db_cdr_master_connect(); if (!$db) { exit(1); } $t = $fr; $i = 0; $vals = array(); $maxval = 0; while ($t <= $to) { $qtto = strToTime($xtstr, $t); $val = (int) @$db->executeGetOne('SELECT AVG(`duration`) FROM `ast_cdr` WHERE `calldate`>=\'' . $db->escape(gmDate('Y-m-d H:i:s', $t)) . '\' AND `calldate`< \'' . $db->escape(gmDate('Y-m-d H:i:s', $qtto)) . '\' AND `dst`<>\'s\' AND `dst`<>\'h\' AND `dst` NOT LIKE \'*%\' AND `disposition`=\'ANSWERED\''); $vals[] = $val; if ($val > $maxval) { $maxval = $val; } $t = $qtto; ++$i; } //print_r($vals); } $ystep = (double) @$_REQUEST['ystep']; if ($ystep < 1) {
<html> <head> <title>IMS LTI Tool Test Detail</title> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body> <a href="http://www.imsglobal.org" target="_new"> <img src="http://www.imsglobal.org/images/imslogo96dpi-ialsm2.jpg" align="right" border="0"/> </a> <h1>IMS LTI Tool Test Detail</h1> <p> This describes the tests which are used in the IMS Learning Tools Interoperability Tool Tests. </p><p> <? echo(gmDate("Y-m-d\TH:i:s\Z").' '); ?> <br clear="all"/> </p> <?php require_once "blti_util.php"; require_once "cert_util.php"; // Print out the list echo '<table><tr><th>Test</th><th>Decription</th></tr>' . "\n"; $idno = 100; $count = 0; $good = 0; foreach ($tool_tests as $test => $testinfo) { echo '<tr><td>'; echo $test; echo '</td><td>'; echo $testinfo["doc"] . "\n"; $extra = "";
} else { echo "\t<script type='text/javascript'>alert('Not Updated please enter response');</script>"; } } if (isset($_REQUEST["decline"])) { $sid = $_POST["sid"]; if ($res != "" || $res != null) { $m = mysql_query("update stu_requests set status='decline',response='{$res}' where sid='{$sid}' and cid='{$clgid}';") or die(mysql_error()); } else { echo "\t<script type='text/javascript'>alert('Not Updated please enter response');</script>"; } } if (isset($_REQUEST["cginfsb"])) { $sub = $_POST["usub"]; $inf = $_POST["uinfo"]; $current_date = gmDate("d-m-Y"); mysql_query("insert into college_updates(cid,subject,info,date) values('{$clgid}','{$sub}','{$inf}','{$current_date}');") or die(mysql_error()); } if (isset($_REQUEST["inidsb"])) { $mids = $_POST["mids"]; $idsarray = explode(",", $mids); $uar = array_unique($idsarray); $nfids = count($uar); echo $nfids; for ($i = 0; $i < $nfids; $i++) { $stid = $uar[$i]; echo $stid; mysql_query("insert into student(cid,sid) values('{$clgid}','{$stid}');") or die(mysql_error()); } } } else {
<img src="logo2.png" style="margin-left: 50px" alt="" /> <p align="center"><font color="white"> <?php /*$noticias = file_get_contents("noticias.txt"); echo $noticias . "<br>";*/ ?> </font> <?php if (!isset($_COOKIE['User'])) { header("Location: index.php"); } else { $tec = $_COOKIE['User']; $host = gethostbyaddr($_SERVER['REMOTE_ADDR']); $id_equip = substr($host, 3, 4); date_default_timezone_set('GMT'); $current_date = gmDate("d-m-Y H:i:s"); if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (isset($_POST['btnSave'])) { $sql = mysql_query("SELECT * FROM auditlist"); $incidente = mysql_real_escape_string($_POST['incid']); if (empty($incidente) or !(isset($_POST['opCSP']) and $_POST['opCSP'] != "") or !(isset($_POST['opCPF']) and $_POST['opCPF'] != "") or !(isset($_POST['opCBCP']) and $_POST['opCBCP'] != "") or !(isset($_POST['opCBPO']) and $_POST['opCBPO'] != "") or !(isset($_POST['opCPL']) and $_POST['opCPL'] != "") or !(isset($_POST['opTBSP']) and $_POST['opTBSP'] != "") or !(isset($_POST['opTBPF']) and $_POST['opTBPF'] != "") or !(isset($_POST['opTBBDC']) and $_POST['opTBBDC'] != "") or !(isset($_POST['opTBPDT']) and $_POST['opTBPDT'] != "") or !(isset($_POST['opSLIOK']) and $_POST['opSLIOK'] != "") or !(isset($_POST['opSB']) and $_POST['opSB'] != "")) { $regMessage = "<font color='red'>Favor preencher todos os campos obrigatórios!</font>"; } else { $opcsp = mysql_real_escape_string($_POST['opCSP']); $opcpf = mysql_real_escape_string($_POST['opCPF']); $opcbcp = mysql_real_escape_string($_POST['opCBCP']); $opcbpo = mysql_real_escape_string($_POST['opCBPO']); $opcpl = mysql_real_escape_string($_POST['opCPL']); $cobs = mysql_real_escape_string($_POST['CObs']); $optbsp = mysql_real_escape_string($_POST['opTBSP']); $optbpf = mysql_real_escape_string($_POST['opTBPF']);
} $rs = $DB->execute('SELECT `m`.`host_id`, `m`.`orig_time`, `m`.`dur`, `m`.`cidnum`, `m`.`cidname`, `m`.`listened_to`, `m`.`orig_mbox`, `h`.`host` FROM `vm_msgs` `m` LEFT JOIN `hosts` `h` ON (`h`.`id`=`m`.`host_id`) WHERE `m`.`user_id`=\'' . $user_id . '\' AND `m`.`folder`=\'' . $DB->escape($fld) . '\' AND `m`.`file`=\'' . $DB->escape($file) . '\''); $info = $rs->fetchRow(); if (!$info) { _not_found(); } $etag = gmDate('Ymd') . '-' . md5($user_id . '-' . $fld . '-' . $file . '-' . $info['host_id'] . '-' . $info['orig_time'] . '-' . $info['dur'] . '-' . $info['cidnum']) . '-' . $fmt; $fake_filename = preg_replace('/[^0-9a-z\\-_.]/i', '', 'vm_' . $ext . '_' . date('Ymd_Hi', $info['orig_time']) . '_' . subStr(md5(date('s', $info['orig_time']) . $info['cidnum']), 0, 4) . '.' . $formats[$fmt]['ext']); if (array_key_exists('HTTP_IF_NONE_MATCH', $_SERVER) && $_SERVER['HTTP_IF_NONE_MATCH'] === $etag) { _not_modified($etag, $attach, $fake_filename); } if ($info['dur'] > 900) { # 900 s = 15 min gs_log(GS_LOG_NOTICE, 'Voicemail too long for web.'); _server_error('File too long.'); } if (!gs_get_conf('GS_INSTALLATION_TYPE_SINGLE')) { $our_host_ids = @gs_get_listen_to_ids(); if (!is_array($our_host_ids)) { gs_log(GS_LOG_WARNING, 'Failed to get our host IDs.'); _server_error('Failed to get our host IDs.'); }
$nCommentID = (int) $_GET['del']; $isAdmin = core::$sql->getRow("select whois from srcms_userprofiles where JID='" . user::accountJIDbyUsername($_SESSION['username']) . "'"); if (core::$sql->numRows("select * from srcms_newscomments where id='{$nCommentID}' and author='{$_SESSION['username']}'") > 0 || $isAdmin == "admin") { core::$sql->exec("delete from srcms_newscomments where id='{$nCommentID}'"); misc::redirect("?pg=news&comment={$_GET['backid']}", 0); } else { echo "<br/><br/>You can't delete comment that does not belong to you."; } } if (!isset($_GET['comment'])) { $hQuery = core::$sql->exec("select * from srcms_news order by id desc"); echo "\r\n\t\t<div id='m-midd'>\r\n\t\t<div id='pn_title'>Home > News</div>\r\n\t"; while ($row = mssql_fetch_array($hQuery)) { $nComments = core::$sql->numRows("select * from srcms_newscomments where newsID='{$row['id']}'"); $szAvatarUrl = user::getUserAvatarUrl($row['author']); $dateee = gmDate('Y-m-d H:i:s'); $nComments = core::$sql->getRow("select count(*) from srcms_newscomments where newsID='{$row['id']}'"); $userRank = core::$sql->getRow("select whois from srcms_userprofiles where JID='" . user::accountJIDbyUsername($row['author']) . "'"); $szUserRank = user::getRankText($userRank); $row['content'] = security::fromHTML($row['content']); $row['content'] = misc::applyAttributesToText($row['content']); $datetime = strtotime($row['time']); $mssqldate = date("d-m-y", $datetime); echo "\r\n<div id='post_home'>\r\n<div class='post_title'>\r\n"; if (strtotime($row['time']) > strtotime('last week')) { echo "<a href='#' class='cat'>New</a>"; } else { echo "<a href='#' class='cat'></a>"; } echo "\r\n<a href='?pg=news&comment={$row['id']}' class='news_title'>{$row['title']}</a>\r\n<span class='date'>posted by <a href='?pg=viewprofile&username={$row['author']}'>{$row['author']}</a> at {$mssqldate} | <a href='?pg=news&comment={$row['id']}' class='news_title'>Comments ({$nComments})</a> </span>\r\n</div>\r\n<a href='#expand' class='xpand'><img src='images/expand.png'></a>\r\n<div class='post_content'>{$row['content']}<br /><br /></div>\r\n</div>\r\n\t\t\t"; }
/** * Returns contents of given group * * @return string * @param string $group * @param array $headers */ public function display($group = self::DEFAULT_GROUP, &$headers = null) { $this->import(); $time = $this->items[$group]['time']; $modified = $this->isModified($group); if (is_array($headers)) { if ($modified) { $headers[] = 'X-Status: 200'; } else { $headers[] = 'X-Status: 304'; } $headers[] = 'Last-Modified: ' . gmDate('D, j M Y H:i:s', $time) . ' GMT'; $headers[] = 'Expires: ' . gmDate('D, j M Y H:i:s', $time + Date::ONE_MONTH) . ' GMT'; $headers[] = 'Cache-Control: max-age=' . Date::ONE_MONTH . ', public'; } else { if ($modified) { header('X-Status: 200', true, 200); } else { header('X-Status: 304', true, 304); } header('Expires: ' . gmDate('D, j M Y H:i:s', $time + Date::ONE_MONTH) . ' GMT'); header('Cache-Control: max-age=' . Date::ONE_MONTH . ', public, must-revalidate, post-check=0, pre-check=0'); header('Last-Modified: ' . gmDate('D, j M Y H:i:s', $time) . ' GMT', true, $modified ? null : 304); } if ($modified) { return file_get_contents($this->getGroupFile($this->generateBaseName(), $group)); } return null; }
/// this is a parent file require_once dirName(__FILE__) . '/../../../inc/conf.php'; # set paths # $GS_URL_PATH = dirName(dirName(@$_SERVER['SCRIPT_NAME'])); if (subStr($GS_URL_PATH, -1, 1) != '/') { $GS_URL_PATH .= '/'; } header('ETag: ' . gmDate('Ymd') . '-' . md5($GS_URL_PATH)); function _not_modified() { header('HTTP/1.0 304 Not Modified', true, 304); header('Status: 304 Not Modified', true, 304); exit; } if (array_key_exists('HTTP_IF_NONE_MATCH', $_SERVER) && $_SERVER['HTTP_IF_NONE_MATCH'] === gmDate('Ymd') . '-' . md5($GS_URL_PATH)) { _not_modified(); } /* $tmp = gmDate('D, d M Y'); if (array_key_exists('HTTP_IF_MODIFIED_SINCE', $_SERVER) && subStr($_SERVER['HTTP_IF_MODIFIED_SINCE'],0,strLen($tmp)) == $tmp ) { _not_modified(); } */ ob_start(); ?> <public:component lightWeight="true"> <public:attach event="onpropertychange" onevent="pngb_property_changed()" /> <public:attach event="onbeforeprint" onevent="pngb_before_print()" for="window" /> <public:attach event="onafterprint" onevent="pngb_after_print()" for="window" />
function dateTime() { return "Date: " . gmDate("m-d-Y") . " | Time: " . gmDate("H:i"); }
if (mysqli_connect_errno($con)) { die(mysqli_connect_errno($con)); } # VOID $mastervoid = $rooturi . "void.ttl#"; $masterset = $mastervoid . "ChEMBLRDF"; $thisset = $mastervoid . "ChEMBLChEBIMapping"; $thisSetTitle = "ChEMBL - ChEBI OWL mappings"; $thisSetDescription = "Mappings between ChEMBL compounds and the ChEBI ontology."; $sourceSet = $mastervoid . "ChEMBLCompound"; $sourceSpace = $CHEMBL; $targetSet = $mastervoid . "ChEBI"; $targetSpace = "http://purl.obolibrary.org/obo/"; $linkPredicate = $SKOS . "exactMatch"; $expresses = $CHEMINF . "CHEMINF_000407"; $current_date = gmDate("Y-m-d\\TH:i:s"); echo triple($thisset, $PAV . "createdBy", $importedBy); echo typeddata_triple($thisset, $PAV . "createdOn", $current_date, $XSD . "dateTime"); echo triple($thisset, $PAV . "authoredBy", $importedBy); echo typeddata_triple($thisset, $PAV . "authoredOn", $current_date, $XSD . "dateTime"); echo triple($thisset, $RDF . "type", $VOID . "Linkset"); echo triple($masterset, $VOID . "subset", $thisset); # echo triple( $molset, $RDF . "type", $VOID . "Dataset" ); echo data_triple($sourceSet, $VOID . "uriSpace", $sourceSpace); echo triple($masterset, $VOID . "subset", $sourceSet); # echo triple( $chebiset, $RDF . "type", $VOID . "Dataset" ); echo data_triple($targetSet, $VOID . "uriSpace", $targetSpace); echo triple($masterset, $VOID . "subset", $thisset); echo "\n"; echo data_triple($thisset, $DCT . "title", $thisSetTitle); echo data_triple($thisset, $DCT . "description", $thisSetDescription);
/** * start point. importer queue processor. check if un-finished import exist. * * @return bool */ public function processQueue() { $this->_helper->allowResourceFullExecution(); if ($item = $this->_getQueue(true)) { $websiteId = $item->getWebsiteId(); if ($this->_helper->isEnabled($websiteId)) { $client = $this->_helper->getWebsiteApiClient($websiteId); if ($item->getImportType() == self::IMPORT_TYPE_CONTACT or $item->getImportType() == self::IMPORT_TYPE_SUBSCRIBERS or $item->getImportType() == self::IMPORT_TYPE_GUEST) { $response = $client->getContactsImportByImportId($item->getImportId()); } else { $response = $client->getContactsTransactionalDataImportByImportId($item->getImportId()); } if ($response && !isset($response->message)) { if ($response->status == 'Finished') { $now = gmDate('Y-m-d H:i:s'); $item->setImportStatus(self::IMPORTED)->setImportFinished($now)->setMessage('')->save(); if ($item->getImportType() == self::IMPORT_TYPE_CONTACT or $item->getImportType() == self::IMPORT_TYPE_SUBSCRIBERS or $item->getImportType() == self::IMPORT_TYPE_GUEST) { if ($item->getImportId()) { $this->_processContactImportReportFaults($item->getImportId(), $websiteId); } } $this->_processQueue(); } elseif (in_array($response->status, $this->import_statuses)) { $item->setImportStatus(self::FAILED)->setMessage($response->status)->save(); $this->_processQueue(); } } if ($response && isset($response->message)) { $item->setImportStatus(self::FAILED)->setMessage($response->message)->save(); $this->_processQueue(); } } } else { $this->_processQueue(); } return true; }
public function writelog($pane) { $path = nZEDb_LOGS; $getdate = gmDate("Ymd"); $tmux = $this->get(); $logs = isset($tmux->write_logs) ? $tmux->write_logs : 0; if ($logs == 1) { return "2>&1 | tee -a {$path}/{$pane}-{$getdate}.log"; } else { return ""; } }
/** * Send request * @param $type * @param $url * @param array $query * @return mixed * @throws \Exception */ private function sendRequest($type, $url, $query = []) { $cred = $this->getCredentials(); $requestTimestamp = gmDate("D, d M Y H:i:s") . 'GMT'; $requestSignature = base64_encode(hash_hmac('sha256', $requestTimestamp, $cred['api_secret'])); $client = $this->getGuzzleClient(); $request = new Request($type, self::ENDPOINTTYPE . $url); //add basic authorization for client $response = $client->send($request, ['timeout' => 2, 'auth' => [$cred['api_key'], $requestSignature], 'headers' => ['X-Request-Timestamp' => $requestTimestamp], 'query' => $query]); $code = $response->getStatusCode(); if ($this->responseHandler($code)) { $response = $response->getBody()->getContents(); return $response; } }