当前位置: 首页>>代码示例>>PHP>>正文


PHP StrSafe_DB函数代码示例

本文整理汇总了PHP中StrSafe_DB函数的典型用法代码示例。如果您正苦于以下问题:PHP StrSafe_DB函数的具体用法?PHP StrSafe_DB怎么用?PHP StrSafe_DB使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了StrSafe_DB函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: safeFilter

 /**
  * safeFilter()
  * Protegge con gli apici gli elementi di $this->opts['events']
  *
  * @return mixed: false se non c'è filtro oppure la stringa da inserire nella where delle query
  */
 protected function safeFilter()
 {
     $ret = array();
     if (!empty($this->opts['events'])) {
         if (!is_array($this->opts['events'])) {
             $this->opts['events'] = array($this->opts['events']);
         }
         $f = array();
         foreach ($this->opts['events'] as $e) {
             @(list($event, $phase) = explode('@', $e));
             if ($event and !is_null($phase)) {
                 $f[] = '(EvCode=' . StrSafe_DB($event) . ' AND GrPhase=' . $phase . ')';
             } elseif ($event) {
                 $f[] = '(EvCode=' . StrSafe_DB($event) . ')';
             } elseif (!is_null($phase)) {
                 $f[] = '(GrPhase=' . $phase . ')';
             }
         }
         if ($f) {
             $ret[] = '(' . implode(' OR ', $f) . ')';
         }
     }
     if (!empty($this->opts['schedule'])) {
         $ret[] = "CONCAT(FSScheduledDate,' ',FSScheduledTime)=" . StrSafe_DB($this->opts['schedule']) . "";
     }
     if ($ret) {
         return ' AND ' . implode(' AND ', $ret);
     }
     return '';
 }
开发者ID:brian-nelson,项目名称:ianseo,代码行数:36,代码来源:Obj_Rank_GridInd.php

示例2: __construct

 function __construct($TemplateID = 0)
 {
     parent::__construct('BackNumber');
     $Select = "SELECT BackNumber.*, LENGTH(BnBackground) as ImgSize  " . "FROM BackNumber  " . "WHERE BnTournament=" . StrSafe_DB($_SESSION['TourId']) . " AND BnFinal in (0," . $TemplateID . ") order by BnFinal desc limit 1";
     //print $Select;exit;
     $Rs = safe_r_sql($Select);
     if (safe_num_rows($Rs) == 1) {
         $this->RowBn = safe_fetch($Rs);
     } else {
         // fall back if no Backnumber creates from template!
         include_once 'Tournament/BackNumberEmpty.php';
         $this->RowBn = emptyBackNumber();
     }
     $this->Rotation = $this->RowBn->BnOffsetX != 0 || $this->RowBn->BnOffsetY != 0;
     $this->RotX = $this->RowBn->BnWidth / 2;
     $this->RotY = $this->RowBn->BnOffsetY / 2;
     // TargetNo Specs
     $this->TargetNoFont = ($this->RowBn->BnTargetNo & 4) == 4 ? $this->FontFix : (($this->RowBn->BnTargetNo & 2) == 2 ? 'dejavuserif' : $this->FontStd);
     $this->TargetNoStyle = ($this->RowBn->BnTargetNo & 8 ? 'B' : '') . ($this->RowBn->BnTargetNo & 16 ? 'I' : '');
     $this->TargetNoColor = array(base_convert(substr($this->RowBn->BnTnoColor, 0, 2), 16, 10), base_convert(substr($this->RowBn->BnTnoColor, 2, 2), 16, 10), base_convert(substr($this->RowBn->BnTnoColor, 4, 2), 16, 10));
     $this->TargetNoAlign = ($this->RowBn->BnTargetNo & 96) == 64 ? 'L' : (($this->RowBn->BnTargetNo & 96) == 32 ? 'R' : 'C');
     // Athlete Specs
     $this->AthleteFont = ($this->RowBn->BnAthlete & 4) == 4 ? $this->FontFix : (($this->RowBn->BnAthlete & 2) == 2 ? 'dejavuserif' : $this->FontStd);
     $this->AthleteStyle = ($this->RowBn->BnAthlete & 8 ? 'B' : '') . ($this->RowBn->BnAthlete & 16 ? 'I' : '');
     $this->AthleteColor = array(base_convert(substr($this->RowBn->BnAthColor, 0, 2), 16, 10), base_convert(substr($this->RowBn->BnAthColor, 2, 2), 16, 10), base_convert(substr($this->RowBn->BnAthColor, 4, 2), 16, 10));
     $this->AthleteAlign = ($this->RowBn->BnAthlete & 96) == 64 ? 'L' : (($this->RowBn->BnAthlete & 96) == 32 ? 'R' : 'C');
     if ($this->RowBn->BnCapitalFirstName) {
         $this->FirstNameAllCaps = true;
     }
     // Country Specs
     $this->CountryFont = ($this->RowBn->BnCountry & 4) == 4 ? $this->FontFix : (($this->RowBn->BnCountry & 2) == 2 ? 'dejavuserif' : $this->FontStd);
     $this->CountryStyle = ($this->RowBn->BnCountry & 8 ? 'B' : '') . ($this->RowBn->BnCountry & 16 ? 'I' : '');
     $this->CountryColor = array(base_convert(substr($this->RowBn->BnCoColor, 0, 2), 16, 10), base_convert(substr($this->RowBn->BnCoColor, 2, 2), 16, 10), base_convert(substr($this->RowBn->BnCoColor, 4, 2), 16, 10));
     $this->CountryAlign = ($this->RowBn->BnCountry & 96) == 64 ? 'L' : (($this->RowBn->BnCountry & 96) == 32 ? 'R' : 'C');
     // background temp creation
     if ($this->RowBn->ImgSize) {
         $this->BackGroundFile = tempnam('/tmp', 'bgf');
         $img = imagecreatefromstring($this->RowBn->BnBackground);
         if (!imagepng($img, $this->BackGroundFile)) {
             die('could not create image');
         }
     }
     $Orientation = $this->RowBn->BnWidth > $this->RowBn->BnHeight ? 'L' : 'P';
     $this->setPageOrientation($Orientation);
     $this->setPageFormat(array($this->RowBn->BnWidth, $this->RowBn->BnHeight), $Orientation);
     $this->SetFont($this->FontStd, '', 10);
     $this->AliasNbPages();
     $this->setPrintHeader(false);
     $this->setPrintFooter(false);
     $this->SetMargins(10, 10, 10);
     $this->SetAutoPageBreak(false, 10);
     $this->SetAuthor('http://www.ianseo.net');
     $this->SetCreator('Software Design by Ianseo');
     $this->SetTitle('IANSEO - Integrated Result System (release ' . ProgramVersion . ')');
     $this->SetSubject('BackNo');
 }
开发者ID:brian-nelson,项目名称:ianseo,代码行数:56,代码来源:BackNoPDF.php

示例3: ProcessSetupFile

/**
 * Processa il file di setup $File2Proc
 *
 * @param String $File2Proc: file da processare (solo il basename!)
 * @param Int $Id: id del torneo
 *
 * @return void
 */
function ProcessSetupFile($Id, $File2Proc = 'Setup.set')
{
    $ff = $File2Proc;
    $fh = @file($ff);
    if ($fh) {
        foreach ($fh as $Buffer) {
            if (trim($Buffer) and substr($Buffer, 0, 1) != '#') {
                $Query = str_replace('##TourId##', StrSafe_DB($Id), $Buffer);
                $Rs = safe_w_sql($Query);
            }
        }
    }
}
开发者ID:brian-nelson,项目名称:ianseo,代码行数:21,代码来源:Fun_ScriptsOnNewTour.inc.php

示例4: MakePhaseFilter

function MakePhaseFilter($Phase)
{
    $Ret = '';
    if (trim($Phase) != '') {
        $Arr_Ph = explode('|', $Phase);
        if (is_array($Arr_Ph)) {
            foreach ($Arr_Ph as $Key => $Value) {
                $Arr_Ph[$Key] = StrSafe_DB($Value);
            }
            $Ret = "IN (" . implode(',', $Arr_Ph) . ") ";
        }
    }
    return $Ret;
}
开发者ID:brian-nelson,项目名称:ianseo,代码行数:14,代码来源:Fun_HTML.local.inc.php

示例5: WriteTeam

function WriteTeam($CurTeam, $CurSubTeam, $CurComponent, $EventCode, $Scores, $Golds, $XNines)
{
    // Insert in Teams
    $InsertQuery = "REPLACE INTO Teams (TeCoId,TeSubTeam,TeEvent,TeTournament,TeFinEvent,TeScore,TeGold,TeXNine,TeFinal) " . "VALUES(" . StrSafe_DB($CurTeam) . "," . StrSafe_DB($CurSubTeam) . "," . StrSafe_DB($EventCode) . "," . StrSafe_DB($_SESSION['TourId']) . "," . "'0'," . StrSafe_DB(array_sum($Scores)) . "," . StrSafe_DB(array_sum($Golds)) . "," . StrSafe_DB(array_sum($XNines)) . "," . "'0'" . ") ";
    $RsT = safe_w_sql($InsertQuery);
    if (empty($CurComponent)) {
        return;
    }
    $InsertQuery = "REPLACE INTO TeamComponent (TcCoId,TcSubTeam, TcTournament,TcEvent,TcFinEvent,TcId,TcOrder) VALUES ";
    for ($i = 0; $i < count($CurComponent); $i++) {
        $InsertQuery .= "(" . StrSafe_DB($CurTeam) . "," . StrSafe_DB($CurSubTeam) . "," . StrSafe_DB($_SESSION['TourId']) . "," . StrSafe_DB($EventCode) . "," . "'0'," . StrSafe_DB($CurComponent[$i]) . "," . StrSafe_DB($i + 1) . '), ';
    }
    $InsertQuery = substr($InsertQuery, 0, -2);
    $RsT = safe_w_sql($InsertQuery);
}
开发者ID:brian-nelson,项目名称:ianseo,代码行数:15,代码来源:Common_MakeTeams.php

示例6: safeFilterR

 /**
  * safeFilterR()
  * Protegge con gli apici gli elementi di $this->opts['eventsR']
  *
  * @return mixed: false se non c'è filtro oppure la stringa da inserire nella where delle query
  */
 protected function safeFilterR()
 {
     $filter = false;
     if (array_key_exists('eventsR', $this->opts)) {
         if (is_array($this->opts['eventsR']) && count($this->opts['eventsR']) > 0) {
             $filter = array();
             foreach ($this->opts['eventsR'] as $e) {
                 $filter[] = StrSafe_DB($e);
             }
             $filter = "AND EvCode IN(" . implode(',', $filter) . ")";
         } elseif (gettype($this->opts['eventsR']) == 'string' && trim($this->opts['eventsR']) != '') {
             $filter = "AND EvCode LIKE '" . $this->opts['eventsR'] . "' ";
         } else {
             $filter = false;
         }
     } else {
         $filter = false;
     }
     return $filter;
 }
开发者ID:brian-nelson,项目名称:ianseo,代码行数:26,代码来源:Obj_Rank_FinalTeam.php

示例7: GetSessions

/**
 * GetSessions().
 * Ritorna l'elenco di tutte le sessioni.
 * La chiave sarà SesOrder_SesType e la descrizione cambierà a seconda del valore di $extend
 *
 * @param char $type: tipo di sessione; null => tutte, Q qualifica E eliminatorie F final
 * @param bool $extend: true per la descrizione estesa: 'Nome (Tipo Ordine)' false per quella breve: Nome (Ordine)
 * @param string[] $ids: vettore di id. se specificato verranno ritornati quelli
 * @param int $tour: null considera il torneo aperto se no quello passato.
 *
 * @return mixed: array con l'elenco delle sessioni con la descrizione impostata in base a $extend e l'id SesOrder_SesType
 */
function GetSessions($type = null, $extend = false, $ids = null, $tour = null)
{
    $tour = !is_null($tour) ? $tour : $_SESSION['TourId'];
    $sessionsTypes = GetSessionsTypes();
    $filter = "SesTournament=" . StrSafe_DB($tour) . " ";
    if (is_null($ids)) {
        if (!is_null($type) && array_key_exists($type, $sessionsTypes)) {
            $filter .= "AND SesType='" . $type . "' ";
        }
    } else {
        if (!is_array($ids)) {
            $ids = array($ids);
        }
        $in = array();
        for ($i = 0; $i < count($ids); ++$i) {
            $in[] = StrSafe_DB($ids[$i]);
        }
        $filter .= "AND CONCAT(SesOrder,'_',SesType) IN (" . implode(',', $in) . ") ";
    }
    $ret = array();
    $q = "SELECT * FROM Session WHERE {$filter} ORDER BY locate(SesType, 'QEF'), SesOrder ";
    $r = safe_r_sql($q);
    // 	debug_svela($q);
    if ($r && safe_num_rows($r) > 0) {
        while ($row = safe_fetch($r)) {
            $tmp = $row;
            $tmp->Id = $row->SesOrder . '_' . $row->SesType;
            if ($row->SesName != '') {
                $tmp->Descr = $row->SesOrder . ': ' . $row->SesName;
                if ($extend) {
                    $tmp->Descr = $row->SesName . ' (' . $sessionsTypes[$row->SesType] . ' ' . $row->SesOrder . ')';
                }
            } else {
                $tmp->Descr = $tmp->SesOrder;
            }
            $ret[] = $tmp;
        }
    }
    return $ret;
}
开发者ID:brian-nelson,项目名称:ianseo,代码行数:52,代码来源:Fun_Sessions.inc.php

示例8: tour_delete

function tour_delete($TourId)
{
    $TableArray = array("AccColors" => "AcTournament", "AccEntries" => "AETournament", "AccPrice" => "APTournament", "ACL" => "AclTournament", 'AclDetails' => 'AclDtTournament', "AvailableTarget" => "AtTournament", "Awards" => "AwTournament", "Awarded" => "AwTournament", "BackNumber" => "BnTournament", "BoinxSchedule" => "BsTournament", "CasScore" => "CaSTournament", "CasTeam" => "CaTournament", "CasTeamFinal" => "CTFTournament", "CasTeamTarget" => "CTTTournament", "Classes" => "ClTournament", "Countries" => "CoTournament", "DistanceInformation" => "DiTournament", "Divisions" => "DivTournament", "Eliminations" => "ElTournament", "Emails" => "EmTournament", "Entries" => "EnTournament", "EventClass" => "EcTournament", "Events" => "EvTournament", "Individuals" => "IndTournament", "F2FGrid" => "F2FTournament", "F2FEntries" => "F2FTournament", "F2FFinal" => "F2FTournament", "FinalReportA" => "FraTournament", "Finals" => "FinTournament", "FinSchedule" => "FSTournament", "FinTraining" => 'FtTournament', "FinTrainingEvent" => 'FteTournament', "Flags" => 'FlTournament', "GuessWho" => 'GwTournament', "GuessWhoData" => 'GwdTournament', "HhtData" => "HdTournament", "HhtEvents" => "HeTournament", "HhtSetup" => "HsTournament", "IdCardElements" => "IceTournament", "IdCards" => "IcTournament", "Images" => "ImTournament", 'ModulesParameters' => 'MpTournament', 'PrintOutsRules' => 'PorTournament', 'RecTournament' => 'RtTournament', "Reviews" => "RevTournament", "Scheduler" => "SchTournament", "Session" => "SesTournament", "SubClass" => "ScTournament", "TargetFaces" => "TfTournament", "TargetGroups" => "TgTournament", "TeamComponent" => "TcTournament", "TeamFinals" => "TfTournament", "TeamFinComponent" => "TfcTournament", "Teams" => "TeTournament", "Tournament" => "ToId", "TournamentDistances" => "TdTournament", "TournamentInvolved" => "TiTournament", "TourRecords" => "TrTournament", "TVContents" => "TVCTournament", "TVOut" => "TvTournament", "TVParams" => "TVPTournament", "TVRules" => "TVRTournament", "TVSequence" => "TVSTournament", "VegasAwards" => "VaTournament");
    foreach ($TableArray as $Key => $Value) {
        $Sql = "DELETE FROM " . $Key . " WHERE " . $Value . " = " . StrSafe_DB($TourId);
        safe_w_sql($Sql);
    }
    $Sql = "DELETE FROM Qualifications WHERE QuId NOT IN (SELECT EnId From Entries) ";
    safe_w_sql($Sql);
    $Sql = "DELETE FROM ElabQualifications WHERE EqId NOT IN (SELECT EnId From Entries) ";
    safe_w_sql($Sql);
    $Sql = "DELETE FROM Eliminations WHERE ElId NOT IN (SELECT EnId From Entries) ";
    safe_w_sql($Sql);
    $Sql = "DELETE FROM Individuals WHERE IndId NOT IN (SELECT EnId From Entries) ";
    safe_w_sql($Sql);
    $Sql = "DELETE FROM Photos WHERE PhEnId NOT IN (SELECT EnId From Entries) ";
    safe_w_sql($Sql);
    $Sql = "DELETE FROM Vegas WHERE VeId NOT IN (SELECT EnId From Entries) ";
    safe_w_sql($Sql);
    $Sql = "DELETE FROM ExtraData WHERE EdId NOT IN (SELECT EnId From Entries) ";
    safe_w_sql($Sql);
}
开发者ID:brian-nelson,项目名称:ianseo,代码行数:22,代码来源:Fun_TourDelete.php

示例9: FindLive

/**
 * Cerca quale evento è live in questo momento
 * Se trova più eventi contemporanei ritorna i dati di quello con modifiche più recenti.
 *
 * @param Int $Team: vale 0 se l'evento è individuale e 1 se è a squadre.
 *
 * @return Array: Un vettore formato dall'Evento e dal MatchNo oppure false in caso di errore.
 * 					Se non ci sono eventi live viene ritornato array(NULL,NULL)
 */
function FindLive($Team = -1)
{
    if ($Team == 0) {
        $Select = "SELECT" . "  '0' Team" . " , FinDateTime DateTime" . " , FinEvent AS Event" . " , FinMatchNo AS MatchNo" . " FROM" . "  Finals " . " WHERE" . "  FinTournament=" . StrSafe_DB($_SESSION['TourId']) . "  AND FinLive='1' " . "ORDER BY" . " Team," . " DateTime DESC," . " Event ASC," . " MatchNo ASC ";
    } elseif ($Team == 1) {
        $Select = "SELECT" . "  '1' Team " . " , TfDateTime DateTime" . " , TfEvent AS Event " . " , TfMatchNo AS MatchNo " . " FROM" . "  TeamFinals " . " WHERE" . "  TfTournament=" . StrSafe_DB($_SESSION['TourId']) . "  AND TfLive='1' " . "ORDER BY" . " Team," . " DateTime DESC," . " Event ASC," . " MatchNo ASC";
    } elseif ($Team == -1) {
        $Select = "(SELECT" . "  '0' Team" . " , FinDateTime DateTime" . " , FinEvent AS Event" . " , FinMatchNo AS MatchNo" . " FROM" . "  Finals " . " WHERE" . "  FinTournament=" . StrSafe_DB($_SESSION['TourId']) . "  AND FinLive='1') " . "UNION " . "(SELECT" . "  '1' Team " . " , TfDateTime DateTime " . " , TfEvent AS Event " . " , TfMatchNo AS MatchNo " . " FROM" . "  TeamFinals " . " WHERE" . "  TfTournament=" . StrSafe_DB($_SESSION['TourId']) . "  AND TfLive='1') " . "ORDER BY" . " Team," . " DateTime DESC," . " Event ASC," . " MatchNo ASC ";
    } else {
        return '';
    }
    $Rs = safe_r_sql($Select);
    // at least 2 rows because "live" is set on both opponents!
    if (safe_num_rows($Rs) < 2) {
        return '';
    }
    $MyRow1 = safe_fetch($Rs);
    $MyRow2 = safe_fetch($Rs);
    // check if these are really 2 opponents in the same match!!
    if ($MyRow1->Event == $MyRow2->Event and $MyRow1->Team == $MyRow2->Team and ($MyRow1->MatchNo == $MyRow2->MatchNo - 1 or $MyRow1->MatchNo == $MyRow2->MatchNo + 1)) {
        return array($MyRow1->Event, min($MyRow1->MatchNo, $MyRow2->MatchNo), $MyRow1->Team);
    }
    return '';
}
开发者ID:brian-nelson,项目名称:ianseo,代码行数:33,代码来源:Config.inc.php

示例10: SetAccreditation

function SetAccreditation($Id, $SetRap = 0, $return = 'RicaricaOpener', $TourId = 0, $AccOp = 0)
{
    $RicaricaOpener = false;
    if (!$TourId) {
        $TourId = $_SESSION['TourId'];
    }
    if (!$AccOp) {
        $AccOp = $_SESSION['AccOp'];
    }
    /*
     * Devo prevenire l'insert se l'id è in stato 7.
     * Per farlo cerco lo stato del tizio.
     * Se è 7 vuol dire che uno ha cliccato sul bottone dopo aver aperto il popup e io non scrivo in db
     */
    $Select = "SELECT EnId FROM Entries\n\t\tWHERE EnId=" . StrSafe_DB($Id) . " AND EnTournament={$TourId} AND EnStatus='7' ";
    $Rs = safe_r_sql($Select);
    //TODO Patchare la query per supportare bene IpV6
    if (safe_num_rows($Rs) == 0) {
        $Insert = "INSERT INTO AccEntries\n\t\t\t(AEId,AEOperation,AETournament,AEWhen,AEFromIp,AERapp)\n\t\t\tVALUES(\n\t\t\t\t{$Id}," . StrSafe_DB($AccOp) . "," . StrSafe_DB($TourId) . "," . StrSafe_DB(date('Y-m-d H:i')) . "," . "INET_ATON('" . ($_SERVER['REMOTE_ADDR'] != '::1' ? $_SERVER['REMOTE_ADDR'] : '127.0.0.1') . "'), " . StrSafe_DB($SetRap) . "" . ") ON DUPLICATE KEY UPDATE " . "AEWhen=" . StrSafe_DB(date('Y-m-d H:i')) . "," . "AEFromIp=INET_ATON('" . ($_SERVER['REMOTE_ADDR'] != '::1' ? $_SERVER['REMOTE_ADDR'] : '127.0.0.1') . "') ";
        $RsIns = safe_w_sql($Insert);
        $RicaricaOpener = $return == 'RicaricaOpener' ? true : (safe_w_affected_rows() ? 'AccreditationOK' : 'AccreditationTwice');
    }
    return $RicaricaOpener;
}
开发者ID:brian-nelson,项目名称:ianseo,代码行数:24,代码来源:Lib.php

示例11: StrSafe_DB

if (!IsBlocked(BIT_BLOCK_PARTICIPANT)) {
    $recalc = false;
    $indFEvent = $teamFEvent = $country = $div = $cl = $zero = null;
    // se cambio status ricalcolo gli spareggi
    $query = "SELECT EnClass FROM Entries WHERE EnId=" . StrSafe_DB($id) . " AND EnStatus<>" . StrSafe_DB($status) . " ";
    //print $query;exit;
    $rs = safe_r_sql($query);
    if ($rs && safe_num_rows($rs) == 1) {
        $recalc = true;
        $x = Params4Recalc($id);
        if ($x !== false) {
            list($indFEvent, $teamFEvent, $country, $div, $cl, $zero) = $x;
        }
    }
    //Adesso aggiorno lo status
    $query = "UPDATE " . "Entries " . "SET " . "EnStatus=" . StrSafe_DB($status) . " " . "WHERE " . "EnId=" . StrSafe_DB($id) . " ";
    $rs = safe_w_sql($query);
    if (!$rs) {
        $error = 1;
    }
    if ($recalc) {
        // ricalcolo il vecchio e il nuovo
        if (!is_null($indFEvent)) {
            RecalculateShootoffAndTeams($indFEvent, $teamFEvent, $country, $div, $cl, $zero);
        }
        // rank di classe x tutte le distanze
        $q = "SELECT ToNumDist FROM Tournament WHERE ToId={$_SESSION['TourId']}";
        $r = safe_r_sql($q);
        $tmpRow = safe_fetch($r);
        for ($i = 0; $i < $tmpRow->ToNumDist; ++$i) {
            if (!is_null($indFEvent)) {
开发者ID:brian-nelson,项目名称:ianseo,代码行数:31,代码来源:xmlUpdateStatus.php

示例12: empty

    exit;
}
$Errore = 0;
if (!IsBlocked(BIT_BLOCK_TOURDATA) && !defined('dontEditClassDiv')) {
    $Age = $_REQUEST['Age'];
    $ClId = $_REQUEST['ClId'];
    if (!is_numeric($Age)) {
        $Errore = 1;
    } else {
        $ClDivAllowed = empty($_REQUEST['AlDivs']) ? '' : $_REQUEST['AlDivs'];
        if (!CheckClassAge($ClId, $Age, $_REQUEST['FromTo'], $ClDivAllowed)) {
            $Errore = 1;
        }
    }
    if (!$Errore) {
        $Update = "UPDATE Classes SET " . "ClAge" . $_REQUEST['FromTo'] . "=" . StrSafe_DB($Age) . " " . ", ClDivisionsAllowed=" . StrSafe_DB($ClDivAllowed) . " " . "WHERE ClId=" . StrSafe_DB($ClId) . " AND ClTournament=" . StrSafe_DB($_SESSION['TourId']) . "";
        $Rs = safe_w_sql($Update);
        $err = safe_w_error();
        if ($err->errno != 0) {
            $Errore = 1;
        }
    }
} else {
    $Errore = 1;
}
if (!debug) {
    header('Content-Type: text/xml');
}
print '<response>' . "\n";
print '<error>' . $Errore . '</error>' . "\n";
print '<clid>' . $_REQUEST['ClId'] . '</clid>' . "\n";
开发者ID:brian-nelson,项目名称:ianseo,代码行数:31,代码来源:UpdateClassAge.php

示例13: define

<?php

define('debug', false);
// settare a true per l'output di debug
require_once dirname(dirname(__FILE__)) . '/config.php';
if (!CheckTourSession()) {
    print get_text('CrackError');
    exit;
}
$Errore = 0;
$XmlOut = "";
$MyQuery = "";
if (isset($_REQUEST["Session"]) && isset($_REQUEST["Hour"]) && preg_match("/^[1-9]{1}\$/i", $_REQUEST["Session"]) && preg_match("/^[0-9]{2}:[0-9]{2}\$/i", $_REQUEST["Hour"])) {
    $MyQuery = "SELECT QuTargetNo, (QuTimeStamp > " . StrSafe_DB(date("Y-m-d") . " " . $_REQUEST["Hour"] . ":00") . ") as isUpdated" . " FROM Qualifications" . " INNER JOIN Entries ON QuId=EnId" . " WHERE EnTournament=" . StrSafe_DB($_SESSION['TourId']) . " AND QuSession=" . StrSafe_DB($_REQUEST["Session"]) . " AND EnStatus <=1 " . " ORDER BY QuTargetNo";
    //echo $MyQuery; exit();
    $Rs = safe_r_sql($MyQuery);
    if (safe_num_rows($Rs) > 0) {
        $OldTarget = '';
        $cntOk = 0;
        $cntKo = 0;
        while ($MyRow = safe_fetch($Rs)) {
            if ($OldTarget != substr($MyRow->QuTargetNo, 0, -1) && $OldTarget != '') {
                $XmlOut .= "<target>\n";
                $XmlOut .= "<no>" . substr($OldTarget, 1) . "</no>\n";
                $XmlOut .= "<status>" . ($cntKo == 0 ? '0' : ($cntOk == 0 ? '2' : '1')) . "</status>\n";
                $XmlOut .= "</target>\n";
                $cntOk = 0;
                $cntKo = 0;
            }
            if ($MyRow->isUpdated == 1) {
                $cntOk++;
开发者ID:brian-nelson,项目名称:ianseo,代码行数:31,代码来源:TargetUpdate_XML.php

示例14: dirname

<?php

require_once dirname(dirname(dirname(__FILE__))) . '/config.php';
CheckTourSession(true);
print_r($_COOKIE);
$JS_SCRIPT = array('<script type="text/javascript" src="Fun_AJAX_GetImage.js"></script>', '<script type="text/javascript" src="../Fun_JS.js"></script>');
$txtHeader = "";
$athId = empty($_REQUEST['AthId']) || $_REQUEST['AthId'] == 0 ? null : $_REQUEST['AthId'];
$sql = "SELECT EnCode, EnFirstName, EnName FROM Entries WHERE EnId=" . StrSafe_DB($athId) . " AND EnTournament=" . StrSafe_DB($_SESSION['TourId']);
$Rs = safe_r_sql($sql);
if (safe_num_rows($Rs) == 1) {
    $MyRow = safe_fetch($Rs);
    $txtHeader = $MyRow->EnCode . " - " . $MyRow->EnFirstName . " " . $MyRow->EnName;
}
$x = 168;
$y = 78;
$w = 300;
$camurl = empty($_REQUEST['CamUrl']) ? "" : urldecode($_REQUEST['CamUrl']);
if (!$camurl) {
    $camurl = $_COOKIE['CamUrl'];
}
$boundary = "\n--";
$f = @fopen($camurl, "r");
if ($camurl and $f) {
    $r = "";
    $im = null;
    if (preg_match('/\\.jpg$/i', $camurl) != 0) {
        while (!feof($f)) {
            $r .= fread($f, 4096);
        }
        $im = imagecreatefromstring($r);
开发者ID:brian-nelson,项目名称:ianseo,代码行数:31,代码来源:getImage.php

示例15: foreach

        foreach ($v['events'] as $ph => $ev) {
            $val[] = $ph . ' (' . implode('+', $ev) . ')';
        }
        //					$ComboSes.='<option value="'.$k.'"'.$v['selected'].'>'.$v['date']  . ' '. implode('; ',$val).'</option>';
        echo '<tr id="row_' . $k . '">';
        echo '<td class="Center">';
        if ($k && array_key_exists($k, $EventArray) && $EventArray[$k] != $_REQUEST['Id']) {
            echo "&nbsp;";
        } else {
            echo '<input type="checkbox" name="eventList" value="' . $k . '" id="chk_' . $k . '" ' . (array_key_exists($k, $EventArray) ? 'checked' : '') . ' onClick="saveHhtEvent(\'' . $k . '\')">';
        }
        echo '</td>';
        echo '<td colspan="2">' . $v['date'] . ' ' . implode('; ', $val) . '</td>';
        echo '</tr>' . "\n";
    }
}
sort($listCodes);
$delete = "DELETE FROM HhtEvents " . "WHERE HeEventCode NOT IN (" . implode(',', $listCodes) . ") AND HeTournament=" . StrSafe_DB($_SESSION['TourId']) . " ";
$rs = safe_w_sql($delete);
?>
		</table>
		</form>
		<br>
		<a class="Link" href="Configuration.php"><?php 
echo get_text('Back');
?>
</a>
	</div>
</div>
<?php 
include 'Common/Templates/tail.php';
开发者ID:brian-nelson,项目名称:ianseo,代码行数:31,代码来源:ConfDetails.php


注:本文中的StrSafe_DB函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。