Beispiel #1
0
 /**
  * constructor, init the parent-class
  */
 public function __construct()
 {
     //find the params to use
     $this->strFilename = urldecode(getGet("image"));
     //avoid directory traversing
     $this->strFilename = str_replace("../", "", $this->strFilename);
     $this->intMaxHeight = (int) getGet("maxHeight");
     if ($this->intMaxHeight < 0) {
         $this->intMaxHeight = 0;
     }
     $this->intMaxWidth = (int) getGet("maxWidth");
     if ($this->intMaxWidth < 0) {
         $this->intMaxWidth = 0;
     }
     $this->intFixedHeight = (int) getGet("fixedHeight");
     if ($this->intFixedHeight < 0 || $this->intFixedHeight > 2000) {
         $this->intFixedHeight = 0;
     }
     $this->intFixedWidth = (int) getGet("fixedWidth");
     if ($this->intFixedWidth < 0 || $this->intFixedWidth > 2000) {
         $this->intFixedWidth = 0;
     }
     $this->intQuality = (int) getGet("quality");
     if ($this->intQuality <= 0 || $this->intQuality > 100) {
         $this->intQuality = 90;
     }
     $this->strSystemid = getGet("systemid");
     $this->strElementId = getGet("elementid");
 }
Beispiel #2
0
 public function debugHelper()
 {
     echo "<pre>";
     echo "<b>Kajona V4 Debug Subsystem</b>\n\n";
     if (getGet("debugfile") != "") {
         echo "Loading path for " . getGet("debugfile") . "\n";
         $strPath = array_search(getGet("debugfile"), class_resourceloader::getInstance()->getFolderContent("/debug", array(".php")));
         if ($strPath !== false) {
             echo "Passing request to " . $strPath . "\n\n";
             include _realpath_ . $strPath;
         }
     } else {
         echo "Searching for debug-scripts available...\n";
         $arrFiles = class_resourceloader::getInstance()->getFolderContent("/debug", array(".php"));
         echo "<ul>";
         foreach ($arrFiles as $strPath => $strOneFile) {
             echo "<li><a href='?debugfile=" . $strOneFile . "' >" . $strOneFile . "</a> <br />" . $strPath . "</li>";
         }
         echo "</ul>";
     }
     $arrTimestampEnde = gettimeofday();
     $intTimeUsed = ($arrTimestampEnde['sec'] * 1000000 + $arrTimestampEnde['usec'] - ($this->arrTimestampStart['sec'] * 1000000 + $this->arrTimestampStart['usec'])) / 1000000;
     echo "\n\n<b>PHP-Time:</b>                              " . number_format($intTimeUsed, 6) . " sec \n";
     echo "<b>Queries db/cachesize/cached/fired:</b>     " . class_carrier::getInstance()->getObjDB()->getNumber() . "/" . class_carrier::getInstance()->getObjDB()->getCacheSize() . "/" . class_carrier::getInstance()->getObjDB()->getNumberCache() . "/" . (class_carrier::getInstance()->getObjDB()->getNumber() - class_carrier::getInstance()->getObjDB()->getNumberCache()) . "\n";
     echo "<b>Templates cached:</b>                      " . class_carrier::getInstance()->getObjTemplate()->getNumberCacheSize() . " \n";
     echo "<b>Memory/Max Memory:</b>                     " . bytesToString(memory_get_usage()) . "/" . bytesToString(memory_get_peak_usage()) . " \n";
     echo "<b>Classes Loaded:</b>                        " . class_classloader::getInstance()->getIntNumberOfClassesLoaded() . " \n";
     echo "<b>Cache requests/hits/saves/cachesize:</b>   " . class_cache::getIntRequests() . "/" . class_cache::getIntHits() . "/" . class_cache::getIntSaves() . "/" . class_cache::getIntCachesize() . " \n";
     echo "</pre>";
 }
Beispiel #3
0
function validateSinglePage(class_module_pages_page $objPage)
{
    $arrElements = class_module_pages_pageelement::getAllElementsOnPage($objPage->getSystemid());
    $intI = 0;
    $strPrevPlaceholder = "";
    $strPrevLanguage = "";
    foreach ($arrElements as $objOneElement) {
        $strCurLevel = $objOneElement->getSystemid() . " - " . $objOneElement->getIntSort() . " - " . $objOneElement->getStrRecordClass() . " - " . $objOneElement->getStrDisplayName() . " - " . $objOneElement->getStrPlaceholder();
        if ($strPrevPlaceholder != $objOneElement->getStrPlaceholder() || $strPrevLanguage != $objOneElement->getStrLanguage()) {
            $intI = 1;
        }
        if ($objOneElement->getIntSort() != $intI) {
            $strCurLevel = "<span style='color: red'>expected: " . $intI . ", got " . $objOneElement->getIntSort() . " @ " . $strCurLevel . "</span>";
            if (getGet("doFix") != "") {
                $strCurLevel .= "\nSetting new sort-id to " . $intI . "\n";
                $strQuery = "UPDATE " . _dbprefix_ . "system SET system_sort = ? WHERE system_id = ? ";
                class_carrier::getInstance()->getObjDB()->_pQuery($strQuery, array($intI, $objOneElement->getSystemid()));
            }
        } else {
            $strCurLevel = "<span style='color: green'>" . $strCurLevel . "</span>";
        }
        echo "<div style='padding-left: 25px;'>" . $strCurLevel . "</div>";
        $strPrevPlaceholder = $objOneElement->getStrPlaceholder();
        $strPrevLanguage = $objOneElement->getStrLanguage();
        $intI++;
    }
}
Beispiel #4
0
 public function __construct()
 {
     //start up system
     $this->objTemplates = class_carrier::getInstance()->getObjTemplate();
     $this->objLang = class_carrier::getInstance()->getObjLang();
     //init session-support
     $this->objSession = class_carrier::getInstance()->getObjSession();
     //set a different language?
     if (issetGet("language")) {
         if (in_array(getGet("language"), explode(",", class_carrier::getInstance()->getObjConfig()->getConfig("adminlangs")))) {
             $this->objLang->setStrTextLanguage(getGet("language"));
             //and save to a cookie
             $objCookie = new class_cookie();
             $objCookie->setCookie("adminlanguage", getGet("language"));
         }
     } else {
         //init correct text-file handling as in admins
         $this->objLang->setStrTextLanguage($this->objSession->getAdminLanguage(true));
     }
     $this->STR_ORIG_CONFIG_FILE = class_resourceloader::getInstance()->getCorePathForModule("module_system") . "/module_system/system/config/config.php";
     $this->STR_PROJECT_CONFIG_FILE = _realpath_ . "/project/system/config/config.php";
 }
Beispiel #5
0
                    class_response_object::getInstance()->addHeader("Content-Length: " . filesize(_realpath_ . $objFile->getStrFilename()));
                    //End Session
                    $this->objSession->sessionClose();
                    class_response_object::getInstance()->sendHeaders();
                    //Loop the file
                    $ptrFile = @fopen(_realpath_ . $objFile->getStrFilename(), 'rb');
                    fpassthru($ptrFile);
                    @fclose($ptrFile);
                    ob_flush();
                    flush();
                    return "";
                } else {
                    class_response_object::getInstance()->setStrStatusCode(class_http_statuscodes::SC_FORBIDDEN);
                }
            } else {
                class_response_object::getInstance()->setStrStatusCode(class_http_statuscodes::SC_NOT_FOUND);
            }
        } else {
            class_response_object::getInstance()->setStrStatusCode(class_http_statuscodes::SC_NOT_FOUND);
        }
        //if we reach up here, something gone wrong :/
        class_response_object::getInstance()->setStrRedirectUrl(str_replace(array("_indexpath_", "&amp;"), array(_indexpath_, "&"), class_link::getLinkPortalHref(class_module_system_setting::getConfigValue("_pages_errorpage_"))));
        class_response_object::getInstance()->sendHeaders();
        class_response_object::getInstance()->sendContent();
        return "";
    }
}
//Create a object
$objDownload = new class_download_manager(getGet("systemid"));
$objDownload->actionDownload();
class_core_eventdispatcher::getInstance()->notifyGenericListeners(class_system_eventidentifier::EVENT_SYSTEM_REQUEST_AFTERCONTENTSEND, array(class_request_entrypoint_enum::DOWNLOAD()));
 /**
  * @return string
  */
 public function getReport()
 {
     $strReturn = "";
     //showing a list using the pageview
     $objArraySectionIterator = new class_array_section_iterator($this->getTopQueriesCount());
     $objArraySectionIterator->setPageNumber((int) (getGet("pv") != "" ? getGet("pv") : 1));
     $objArraySectionIterator->setArraySection($this->getTopQueries($objArraySectionIterator->calculateStartPos(), $objArraySectionIterator->calculateEndPos()));
     $intI = 0;
     $arrLogs = array();
     $objUser = new class_module_user_user(class_session::getInstance()->getUserID());
     foreach ($objArraySectionIterator as $intKey => $arrOneLog) {
         if ($intI++ >= $objUser->getIntItemsPerPage()) {
             break;
         }
         $arrLogs[$intKey][0] = $intI;
         $arrLogs[$intKey][1] = $arrOneLog["search_log_query"];
         $arrLogs[$intKey][2] = $arrOneLog["hits"];
     }
     //Create a data-table
     $arrHeader = array();
     $arrHeader[0] = "#";
     $arrHeader[1] = $this->objLang->getLang("header_query", "search");
     $arrHeader[2] = $this->objLang->getLang("header_amount", "search");
     $strReturn .= $this->objToolkit->dataTable($arrHeader, $arrLogs);
     $strReturn .= $this->objToolkit->getPageview($objArraySectionIterator, "stats", uniStrReplace("class_stats_report_", "", get_class($this)));
     return $strReturn;
 }
Beispiel #7
0
<?php

@(include 'utilities/all.php');
header("Content-Type: application/json");
checkGetParameter('title');
checkGetParameter('price');
checkGetParameter('description');
checkGetParameter('photo');
checkGetParameter('thumbnail');
checkGetParameter('fb_id');
checkGetParameter('cat_name');
$title = cleanString(getGet('title'));
$price = cleanString(getGet('price'));
$description = cleanString(getGet('description'));
$photo = cleanString(getGet('photo'));
$thumbnail = cleanString(getGet('thumbnail'));
$fb_id = cleanString(getGet('fb_id'));
$cat_name = cleanString(getGet('cat_name'));
$sql = "SELECT * FROM users, schools WHERE fb_id={$fb_id} AND users.school_id = schools.school_id";
$result = db_query($sql);
$row = mysql_fetch_array($result, MYSQL_ASSOC);
$school_id = $row['school_id'];
$user_name = $row['name'];
#TODO: Checking if the user has submitted the maximum number of items
$sql = "INSERT INTO items (item_title, item_price, item_description, item_photo, item_thumbnail, \n\tfb_id, cat_name, school_id, user_name)\n\t\tVALUES ('{$title}', {$price}, '{$description}', '{$photo}', '{$thumbnail}', {$fb_id}, \n\t'{$cat_name}', {$school_id}, '{$user_name}')";
$result = db_query($sql);
$out['success'] = true;
echo json_encode($out);
<?php

@(include 'utilities/all.php');
header("Content-Type: application/json");
$school = cleanString(getGet('school'));
$where = "WHERE 1 AND schools.school_id=users.school_id";
if ($school != '') {
    $where .= " AND school_id={$school}";
}
$sql = "SELECT count(*) as num FROM users, schools {$where}";
#echo $sql;
$result = db_query($sql);
$arr = array();
$out = mysql_fetch_array($result, MYSQL_ASSOC);
echo json_encode($out);
Beispiel #9
0
<?php

/*"******************************************************************************************************
*   (c) 2004-2006 by MulchProductions, www.mulchprod.de                                                 *
*   (c) 2007-2015 by Kajona, www.kajona.de                                                              *
*       Published under the GNU LGPL v2.1, see /system/licence_lgpl.txt                                 *
*-------------------------------------------------------------------------------------------------------*
*	$Id$                                                      *
********************************************************************************************************/
//Determine the area to load
if (issetGet("admin") && getGet("admin") == 1) {
    define("_admin_", true);
} else {
    define("_admin_", false);
}
define("_autotesting_", false);
/**
 * Class handling all requests to be served with xml
 *
 * @package module_system
 */
class class_xml
{
    private static $bitRenderXmlHeader = true;
    /**
     * @var class_response_object
     */
    public $objResponse;
    /**
     * Starts the processing of the requests, fetches params and passes control to the request dispatcher
     * @return void
Beispiel #10
0
<?php

include 'utilities/all.php';
require_once 'utilities/facebook.php';
include 'm_facebook.php';
$isLoggedIn;
if (checkLogin($user)) {
    $isLoggedIn = true;
} else {
    $isLoggedIn = false;
}
$user_id = getGet('user_id');
if ($user_id == '') {
    header("Location: index.php");
    exit(0);
}
$param = array('userid' => $user_id);
$otheruser = extrabaon_api("GetUserDetails", $param);
@(include 'm_htmldoctype.php');
?>
<html>
<head>
	<?php 
@(include 'm_htmlhead-init.php');
?>
	
	<title></title>
	<meta property="fb:app_id"      content="" /> 
	<meta property="og:type"        content="" /> 
	<meta property="og:url"         content="" /> 
	<meta property="og:title"       content="" /> 
Beispiel #11
0
<?php

require_once 'core.php';
require_once 'utility.php';
$name = getGet('name', '');
$team = getTeam("{$name}");
?>

<HEAD>
<TITLE>
<?php 
if ($team) {
    echo "NFL Team: {$name}";
} else {
    echo "NFL Team Lookup";
}
?>
</TITLE>
<?php 
echo $headBust;
?>
</HEAD>
<BODY BGCOLOR=WHITE>
<DIV ALIGN="CENTER">
<?php 
if ($team) {
    ?>

<TABLE ALIGN="CENTER">
<TR><H1><?php 
    echo $name;
Beispiel #12
0
    //新文件名
    $new_file_name = date("YmdHis") . '_' . rand(10000, 99999) . '.' . $file_ext;
    //移动文件
    $file_path = $save_path . $new_file_name;
    @chmod($file_path, 0644);
    //修改目录权限(Linux)
    if (move_uploaded_file($tmp_name, $file_path) === false) {
        //开始移动
        exit("返回错误: 上传文件失败。({$file_name})");
    }
    $file_url = $save_url . $new_file_name;
    $fileName = uniqid('image', true) . $type;
    echo "<a href=\"" . $file_url . "\" target=\"_blank\">原图[{$file_url}]</a><br />";
    echo "所在目录 \"{$save_url}\"<br />";
    echo "Stored in: " . $file_name . "<br />";
    echo "MD5效验:" . getGet("access2008_File_md5") . "<br />";
    echo "<br />上传成功!你选择的是<font color='#ff0000'>" . getPost("select") . "</font>--<font color='#0000ff'>" . getPost("select2") . "</font>";
    if (getPost("access2008_box_info_max") != "") {
        echo "<br />组件文件列表统计,总数量:" . getPost("access2008_box_info_max") . ",剩余:" . ((int) getPost("access2008_box_info_upload") - 1) . ",完成:" . ((int) getPost("access2008_box_info_over") + 1);
    }
    echo " <br />旋转角度:" . getPost("access2008_image_rotation");
}
function filekzm($a)
{
    $c = strrchr($a, '.');
    if ($c) {
        return $c;
    } else {
        return '';
    }
}
Beispiel #13
0
/**
 * POST or GET
 */
function getRequest($key, $default = null)
{
    return filter_has_var(INPUT_POST, $key) ? getPost($key, $default) : getGet($key, $default);
}
<?php

@(include 'utilities/all.php');
header("Content-Type: application/json");
$school = cleanString(getGet('school'));
$category = cleanString(getGet('category'));
$query = cleanString(getGet('query'));
$where = "WHERE item_status=1";
if ($school != '') {
    $where .= " AND school_id={$school} ";
}
if ($category != '') {
    $where .= " AND cat_name='{$category}' ";
}
if ($query != '') {
    $where .= " AND (item_title LIKE '%{$query}%' OR item_description LIKE '%{$query}%') ";
}
$sql = "SELECT count(*) as num FROM items {$where} ";
#echo $sql;
$result = db_query($sql);
$arr = array();
$out = mysql_fetch_array($result, MYSQL_ASSOC);
echo json_encode($out);
Beispiel #15
0
 function getGet($key, $default = '')
 {
     return getGet($key, $default);
 }
Beispiel #16
0
 public function getGet($key, $ignoreStripTags = false)
 {
     return getGet($key, 'any', $ignoreStripTags);
 }
Beispiel #17
0
</head>
<body>
<?php 
function getGet($name, $default = "")
{
    if (isset($_GET[$name])) {
        return $_GET[$name];
    } else {
        return $default;
    }
}
$status = true;
$message = "";
$numero = getGet("numero");
$date = getGet("date");
$list = getGet("list");
$file_name = $numero . ".db";
if ($numero == "") {
    $message = "<p>Le numéro n'est pas renseigné</p>";
    $status = false;
}
if ($date == "") {
    $message = $message . "<p>La date n'est pas renseignée</p>";
    $status = false;
}
if ($list == "") {
    $message = $message . "<p>La liste n'est pas renseignée</p>";
    $status = false;
}
if ($status == true) {
    $db = new SQLite3($file_name);
Beispiel #18
0
<?php

@(include 'utilities/all.php');
header("Content-Type: application/json");
$school = cleanString(getGet('school'));
$category = cleanString(getGet('category'));
$num = cleanString(getGet('num'));
$where = "WHERE item_status=1";
if ($school != '') {
    $where .= " AND school_id={$school} ";
}
if ($category != '') {
    $where .= " AND cat_name='{$category}' ";
}
if ($num == '') {
    $num = 10;
}
$order = "ORDER BY item_date DESC";
$limit = "LIMIT {$num}";
$sql = "SELECT * FROM items {$where} {$order} {$limit}";
#echo $sql;
$result = db_query($sql);
$arr = array();
$count = 0;
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
    $arr[$count] = $row;
    $count++;
}
$out['items'] = $arr;
echo json_encode($out);
Beispiel #19
0
     exit;
 } else {
     $file = array();
     $file['msg_attention'] = '<div class="notification attention png_bg"><div><span style="float:left;">上传失败: </span>' . $_FILES["Filedata"]["name"] . '</div></div>';
     $file['msg_success_normal'] = '<div class="notification success png_bg"><div><span style="float:left;">上传成功: </span>' . $_FILES["Filedata"]["name"] . '</div></div>';
     $file['msg_success_cover'] = '<div class="notification attention png_bg"><div><span style="float:left;">上传成功: </span>' . $_FILES["Filedata"]["name"] . ' 已覆盖</div></div>';
     $file['file_type'] = '<span style="float:left;">文件类型: </span>' . $type . '<br />';
     $file['file_size'] = '<span style="float:left;">文件大小: </span>' . dealsize($_FILES["Filedata"]["size"]) . '<br />';
     $file['file_md5'] = '<span style="float:left;">MD5 校验 : </span>' . getGet("access2008_File_md5") . '<br />';
     $file['info'] = '<div class="notification information png_bg"><div>' . $file['file_type'] . $file['file_size'] . $file['file_md5'] . '</div></div>';
     $file['msg_error_exist'] = '<div class="notification error png_bg"><div><span style="float:left;">错误信息: </span>' . $_FILES["Filedata"]["name"] . '文件已存在</div></div>';
     $file['msg_error_cover'] = '<div class="notification error png_bg"><div><span style="float:left;">错误信息: </span>覆盖上传失败</div></div>';
     $file['msg_error_md5'] = '<div class="notification error png_bg"><div><span style="float:left;">错误信息: </span>文件MD5校验失败</div></div>';
     $file['msg_error_unknow'] = '<div class="notification error png_bg"><div><span style="float:left;">错误信息: </span>未知错误</div></div>';
     $file['msg_error_notallow'] = '<div class="notification error png_bg"><div><span style="float:left;">错误信息: </span>请检查文件类型和文件大小是否符合标准</div></div>';
     if (getGet("access2008_File_md5") !== md5_file($_FILES["Filedata"]["tmp_name"])) {
         echo $file['msg_attention'], $file['info'];
         exit($file['msg_error_md5']);
     }
     if (file_exists($uploadfile) && !(bool) $_REQUEST['cover']) {
         echo $file['msg_attention'], $file['info'];
         exit($file['msg_error_exist']);
     } elseif (file_exists($uploadfile) && (bool) $_REQUEST['cover']) {
         if (@unlink($uploadfile) && move_uploaded_file($_FILES["Filedata"]["tmp_name"], $uploadfile)) {
             echo $file['msg_success_cover'], $file['info'];
             exit;
         } else {
             echo $file['msg_attention'], $file['info'];
             exit($file['msg_error_cover']);
         }
     } else {
Beispiel #20
0
<?php

@(include 'utilities/all.php');
header("Content-Type: application/json");
checkGetParameter('item_id');
checkGetParameter('fb_id');
checkGetParameter('message');
$item_id = cleanString(getGet('item_id'));
$fb_id = cleanString(getGet('fb_id'));
$message = cleanString(getGet('message'));
$sql = "INSERT INTO messages (item_id, fb_id, message) \n\tVALUES ({$item_id}, {$fb_id}, '{$message}')";
$result = db_query($sql);
$out['success'] = true;
echo json_encode($out);
Beispiel #21
0
<?php

//-----------------------------------------------------------------------------
// viewPropertySheet.php --
//
// View the contents of any property sheet.
//
// Copyright (c) 2005-2014 Electric Cloud, Inc.
// All rights reserved
//-----------------------------------------------------------------------------
require_once 'startup.php';
Html::includeCss("lib/styles/Header.css");
$path = getGet("path");
Data::$queries["genericProperties"] = array("request" => "getProperties", "constantArgs" => array("path", $path, "recurse", 0, 'expand', 0), "result" => "propertySheet");
$page = new Page("Properties", new StdFrame(new NavInfo()), new Header(array("id" => "pageHeader", "class" => "pageHeader", "title" => ecgettext("Properties"), "title2" => $path)), new SubSection(new PropertySection(array("id" => "properties", "title" => ecgettext("Properties"), "type" => "generic", "expandable" => 0))), new StdFrameEnd());
$page->show();
<?php

require_once 'startup.php';
$projectName = getGet("projectName");
if (getPostData("formId") == "rollbackVersionedProject" && getPostData("action") == ecgettext("OK")) {
    $comment = getPostData("comment");
    if ($comment == "") {
        Error::formError(ecgettext("A commit comment is required."), "comment");
    }
    $version = getPostData("version");
    $updateManager = new UpdateManager();
    $update = $updateManager->createUpdate("runProcedure");
    $update->addItem("projectName", "/plugins/@PLUGIN_KEY@/project");
    $update->addItem("procedureName", "RollbackProjectChanges");
    $update->addItem("actualParameter", array("actualParameterName" => "project_name", "value" => $projectName));
    $update->addItem("actualParameter", array("actualParameterName" => "version", "value" => $version));
    $update->addItem("actualParameter", array("actualParameterName" => "comment", "value" => $comment));
    $updateManager->handleUpdates();
    $response = $update->getResponse();
    $id = $response->get("jobId");
    Data::$queries["getJobInfo"] = array("request" => "getJobInfo", "constantArgs" => array("jobId", $id), "result" => "job");
    $limit = 10;
    $i = 0;
    while (1) {
        $result = QueryManager::handleQueryNow("getJobInfo");
        if ($i == $limit || $result->get("status") == "completed") {
            break;
        }
        sleep(1);
        $i++;
    }
Beispiel #23
0
<?php

include_once "../protected/mysql.inc";
include_once "../commonstuff.php";
$contactLanguage1 = ContactCreateFromPost("language1");
$contactLanguage2 = ContactCreateFromPost("language2");
$getid = getGet("id", "");
if (strlen($getid) > 0) {
    $contactLanguage1 = ContactJoinGet("language1", $getid);
    $contactLanguage2 = ContactJoinGet("language2", $getid);
} else {
    if (strlen($contactLanguage1->m[$map["name"]]) > 0) {
        ContactUpdate($contactLanguage1, $contactLanguage2);
        header("Location: index.php");
    }
}
include "top.php";
?>

<h4> Edit existing structure </h4>

<form action="<?php 
print $_SERVER['PHP_SELF'];
?>
" method="post" accept-charset="utf-8">
<input type="hidden" value="<?php 
echo $contactLanguage1->m[0];
?>
" name="id">
<table>
<tr><td><b>Language</b></td><td><b><?php 
Beispiel #24
0
<?php

include_once "protected/mysql.inc";
include_once "commonstuff.php";
$searchcriteria = SearchCriteriaCreateFromPost();
$lang = getGet("lang", getPost("lang", "language1"));
include "top.php";
//echo("start ".microtime_float()."<br/>");
//$starttime = microtime_float();
$query = createQuery($lang, $searchcriteria->group, $searchcriteria->location, $searchcriteria->media, $searchcriteria->searchterm, "true");
//echo $query;
$result = mysql_query($query);
//echo "<br/>".mysql_error();
$num = mysql_numrows($result);
include "form.php";
$i = 0;
echo "<div class=\"listarea\">\n";
while ($i < $num) {
    echo "<div class=\"listelement\">\n";
    $contact = ContactFillAll($result, $i);
    $contact->prepareForHTML();
    echo "<h3 class=\"structuretitle\">" . $contact->m[1] . "</h3>\n";
    //name
    echo "<table class=\"shortlistelement\" width=\"100%\"" . ($num == 1 ? "style=\"display: none\"" : "") . ">\n";
    echo "<tr><td width=\"61.8%\">" . $contact->m[2] . "</td>\n";
    //kurzbeschreibung
    echo "<td style=\"padding-left: 15px\" >" . $contact->m[5] . "<br/><br/></td>\n";
    //BasisAdresse
    echo "<td align=\"right\"><a class=\"showdetaillink\"><img src=\"TEX/down.png\" alt=\"down\" border=\"0\"/></a></td></tr>\n";
    echo "</table>\n";
    echo "<table class=\"longlistelement\" width=\"100%\" " . ($num > 1 ? "style=\"display: none\"" : "") . ">\n";
        //phpCAS::logout();
        //phpCAS::forceAuthentication();
        header("Location: http://{$casAuthServer}{$casAuthUri}&category=auth.logout");
    }
    //if ($action=='login')
    if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'login') {
        //phpCAS::forceAuthentication();
        header("Location: http://{$casAuthServer}{$casAuthUri}&category=auth.login");
    }
    if ($_SESSION['CASauthenticated'] === FALSE) {
        header("Location: http://{$casAuthServer}{$casAuthUri}&category=auth.login");
    }
}
if (isset($_GET['token'])) {
    $action = getGet('action');
    $siddy = getGet('sid');
    $get = '?';
    if ($action != FALSE) {
        $get .= "action=" . $action . "&";
    }
    if ($siddy != FALSE) {
        $get .= "sid=" . $siddy . "&";
    }
    header("Location: admin.php{$get}");
}
function getGet($var)
{
    switch ($var) {
        case "all":
            foreach ($_GET as $get) {
                return;
Beispiel #26
0
<?php

include_once 'RestEntity.php';
//include_once 'MunicipioEntity.php';
include_once 'FormularioEntity.php';
$rest = new rest();
if (getGet('test') == 1) {
    //$rest->saveRedord('nhhh', '-64', '-32', '1391701813');
    $rest->saveEncuesta();
}
//	$rest->rating();
if (isset($_GET['id'])) {
    $indice = $_GET['id'];
} else {
    $indice = $_POST['id'];
}
$formulario = new Formularios();
$formulario = $formulario->getFormulario($indice);
//getMunicipios();
print_r($formulario);
function getGet($var)
{
    if (isset($_GET[$var])) {
        return $_GET[$var];
    } else {
        return '';
    }
}
Beispiel #27
0
<?php

@(include 'utilities/all.php');
header("Content-Type: application/json");
checkGetParameter('item_id');
checkGetParameter('fb_id');
$item_id = cleanString(getGet('item_id'));
$fb_id = cleanString(getGet('fb_id'));
$sql = "UPDATE items SET item_status=2 WHERE item_id={$item_id} AND fb_id={$fb_id}";
$result = db_query($sql);
$out['success'] = true;
echo json_encode($out);
Beispiel #28
0
    <!-- Url amigavel -->
  <?php 
function getGet($key)
{
    return isset($_GET[$key]) ? $_GET[$key] : null;
}
$pg = getGet('a');
$file = is_file('view/' . $pg . '.php') ? 'view/' . $pg . '.php' : 'view/contato.php';
switch ($pg) {
    case 'contato':
        $title = 'Contato - ';
        break;
    case 'historia-loja':
        $title = 'História Comércio e Artes - ';
        break;
    default:
        $title = '';
}
Beispiel #29
0
<?php 
//设置sessionid
session_id($_GET['sessionid']);
session_start();
mb_http_input("utf-8");
mb_http_output("utf-8");
if (getGet('access2008_cmd') == '2') {
    // 提交MD5验证后的文件信息进行验证
    //getGet("access2008_File_name") 	'文件名
    //getGet("access2008_File_size")	'文件大小,单位字节
    //getGet("access2008_File_type")	'文件类型 例如.gif .png
    //getGet("access2008_File_md5")		'文件的MD5签名
    die('0');
    //返回命令  0 = 开始上传文件, 2 = 不上传文件,前台直接显示上传完成
}
if (getGet('access2008_cmd') == '3') {
    //提交文件信息进行验证
    //getGet("access2008_File_name") 	'文件名
    //getGet("access2008_File_size")	'文件大小,单位字节
    //getGet("access2008_File_type")	'文件类型 例如.gif .png
    die('1');
    //返回命令 0 = 开始上传文件,1 = 提交MD5验证后的文件信息进行验证, 2 = 不上传文件,前台直接显示上传完成
}
$php_path = dirname(__FILE__) . '/';
$php_url = dirname($_SERVER['PHP_SELF']) . '/';
//文件保存目录路径
$save_path = $php_path . './';
//默认为 update.php所在目录
$save_url = $php_url . './';
//默认为 update.php所在目录
//定义允许上传的文件扩展名
Beispiel #30
0
<?php

include 'utilities/all.php';
require_once 'utilities/facebook.php';
include 'm_facebook.php';
if (!isGetSet('school_id')) {
    header("Location: index.php");
}
$school_id = $_GET['school_id'];
$category = getGet('category');
$query = getGet('query');
$page = getGet('page');
$numPerPage = 10;
$numShow = 3;
$param = array('school_id' => $school_id);
$school_info = extrabaon_api("GetSchoolDetails", $param);
$isLoggedIn;
if (checkLogin($user)) {
    $isLoggedIn = true;
} else {
    $isLoggedIn = false;
}
@(include 'm_htmldoctype.php');
?>
<html>
<head>
	<?php 
@(include 'm_htmlhead-init.php');
?>
	
	<title></title>