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


PHP Query::Row方法代码示例

本文整理汇总了PHP中Query::Row方法的典型用法代码示例。如果您正苦于以下问题:PHP Query::Row方法的具体用法?PHP Query::Row怎么用?PHP Query::Row使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Query的用法示例。


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

示例1: ResortTable

function ResortTable($Table, $ByField = false, $Where = false, $Direction = false)
{
    if (!$Table) {
        return false;
    }
    global $Db;
    if (!$ByField) {
        $ByField = "POSITION";
    }
    if ($Where) {
        $Where = "WHERE " . $Where;
    }
    if ($Direction == 1) {
        $Query = "SELECT MAX({$ByField}) AS MAX_POS FROM {$Table}";
        $Check = $Db->Select($Query);
        $MaxPos = $Check->MAX_POS + 1;
    }
    $Query = "SELECT ID, {$ByField} FROM {$Table} {$Where} ORDER BY {$ByField} ASC";
    $Sql = new Query($Query);
    while ($Row = $Sql->Row()) {
        if ($Row->{$ByField} == 0 && $Direction == 1 && $MaxPos) {
            $Query = "UPDATE {$Table} SET {$ByField} = {$MaxPos} WHERE ID = " . $Row->ID;
            $Db->Query($Query);
        }
        if ($Row->{$ByField} != $Sql->Position + 1) {
            if ($Direction == 1 && $Row->{$ByField} == 0) {
                continue;
            }
            $Query = "UPDATE {$Table} SET {$ByField} = " . ($Sql->Position + 1) . " WHERE ID = " . $Row->ID . "";
            $Db->Query($Query);
        }
    }
}
开发者ID:juliogallardo1326,项目名称:proc,代码行数:33,代码来源:sort.func.php

示例2: SaveSplitToFile

function SaveSplitToFile($Id = false, $Filename, $SplitId = false)
{
    global $Db;
    if (!$Id && !$SplitId) {
        return false;
    }
    $UseStore = $Db->ReturnValue("SELECT USE_STORE FROM " . PFX . "_tracker_config WHERE COMPANY_ID=0");
    if (!$UseStore) {
        return true;
    }
    if (!$SplitId) {
        $SplitId = $Db->ReturnValue("SELECT ID FROM " . PFX . "_tracker_split_test WHERE SUB_ID={$Id}");
    }
    $Query = "\n\t\tSELECT SP.FULL_PATH AS PAGE_PATH\n\t\t\tFROM " . PFX . "_tracker_split_page SP\n\t\t\tINNER JOIN " . PFX . "_tracker_site_page SPA\n\t\t\t\tON SPA.ID=SP.PAGE_ID\n\t\t\tINNER JOIN " . PFX . "_tracker_site S\n\t\t\t\tON S.ID=SPA.SITE_ID\n\t\t\tLEFT JOIN " . PFX . "_tracker_query Q\n\t\t\t\tON Q.ID=SP.QUERY_ID\n\t\t\tWHERE SP.SPLIT_ID={$SplitId}\n\t\t";
    $Sql = new Query($Query, "ARR");
    $PageArr = array();
    while ($Row = $Sql->Row()) {
        if (!ValidVar($Row['HOST'])) {
            continue;
        }
        if (!$Row['PAGE_PATH']) {
            $Row['PAGE_PATH'] = "http://" . $Row['HOST'] . $Row['PATH'];
            if ($Row['QUERY_STRING']) {
                $Row['PAGE_PATH'] .= "?" . $Row['QUERY_STRING'];
            }
        }
        $PageArr[] = $Row['PAGE_PATH'];
    }
    if (!ValidArr($PageArr) || count($PageArr) < 1) {
        return false;
    }
    @clearstatcache();
    $f = @fopen("store/{$Filename}", "a+");
    if (!@is_writable("store/{$Filename}")) {
        return false;
    }
    if (!$f) {
        return false;
    }
    $Data = @fread($f, @filesize("store/{$Filename}"));
    if (!$Data) {
        $DataArr[$SplitId] = $PageArr;
    } else {
        $DataArr = @unserialize($Data);
        if (!ValidArr($DataArr)) {
            $DataArr = array();
        }
        $DataArr[$SplitId] = $PageArr;
    }
    $Data = @serialize($DataArr);
    @flock($f, LOCK_EX);
    @ftruncate($f, 0);
    if (!@fwrite($f, $Data)) {
        return false;
    }
    @flock($f, LOCK_UN);
    @fclose($f);
    return true;
}
开发者ID:juliogallardo1326,项目名称:proc,代码行数:59,代码来源:store.func.php

示例3: SpecificColumn

 /**
  * Returns a specific column
  *
  * @param $array
  *
  * @param $value
  *
  * @return null
  */
 public static function SpecificColumn($array, $value)
 {
     $array = Query::Row($array);
     if (isset($array[$value])) {
         return $array[$value];
     }
     return null;
 }
开发者ID:CrashfortStudios,项目名称:Sirus,代码行数:17,代码来源:Query.php

示例4: ReturnOn

 function ReturnOn($EventName)
 {
     global $Db, $nsProduct;
     $Query = "SELECT * FROM " . PFX . "_system_plugin WHERE EVENT_NAME = '{$EventName}' AND PRODUCT_ID=" . $nsProduct->ID . " ORDER BY ORD";
     $Sql = new Query($Query);
     while ($Row = $Sql->Row()) {
         $fn = $this->Path($Row->DIRNAME, $EventName);
         if (!file_exists($fn)) {
             return false;
         }
     }
     $this->LastEvent = $EventName;
     return $fn;
 }
开发者ID:juliogallardo1326,项目名称:proc,代码行数:14,代码来源:event.class.php

示例5: GetSiteIds

 function GetSiteIds($CpId)
 {
     $Arr = array();
     $Str = "";
     $Query = "SELECT ID FROM " . PFX . "_tracker_site WHERE COMPANY_ID = {$CpId}";
     $Sql = new Query($Query);
     while ($Row = $Sql->Row()) {
         $Arr[] = $Row->ID;
     }
     if (count($Arr) == 0) {
         return false;
     }
     $Str = implode(",", $Arr);
     return $Str;
 }
开发者ID:juliogallardo1326,项目名称:proc,代码行数:15,代码来源:report_parent.class.php

示例6: GetPiecesList

function GetPiecesList()
{
    global $Get, $CurrentCompany, $Lang, $nsUser;
    $InCampArr = array();
    $Query = "\n\t\tSELECT \n\t\t\tTCP.*,\n\t\t\tTST.ID AS SPLIT_TEST\n\t\t\tFROM " . PFX . "_tracker_camp_piece TCP\n\t\t\tINNER JOIN " . PFX . "_tracker_split_test TST\n\t\t\t\tON TST.SUB_ID=TCP.ID\n\t\t\tWHERE TST.COMPANY_ID=" . $CurrentCompany->ID . "\n\t\t\tORDER BY TCP.NAME\n\t";
    $Sql = new Query($Query);
    $Sql->ReadSkinConfig();
    while ($Row = $Sql->Row()) {
        if (!$Row->COMPANY_ID) {
            continue;
        }
        $Row->NAME = stripslashes($Row->NAME);
        $Row->DESCRIPTION = stripslashes($Row->DESCRIPTION);
        $Row->_EDITLINK = getURL("split_test", "EditId=" . $Row->ID);
        $Row->_CODELINK = getURL("campaign_link", "SplitId=" . $Row->ID);
        $Row->_DELETELINK = getURL("split_test", "DeleteId=" . $Row->ID);
        //$Row->_TYPE=$Lang['SplitTest'];
        $Row->_STAT_LINK = getURL("split_test", "SplitId=" . $Row->ID, "report");
        $Row->Report = new SplitStat_v2();
        $Row->Report->SplitId = $Row->ID;
        $Row->Report->CpId = $Row->COMPANY_ID;
        $Row->Report->DisableAll();
        if ($nsUser->Columns->CLICKS) {
            $Row->Report->ShowVisitors = true;
        }
        if ($nsUser->Columns->CONVERSIONS) {
            $Row->Report->ShowActionConv = true;
        }
        if ($nsUser->Columns->CONVERSIONS) {
            $Row->Report->ShowSaleConv = true;
        }
        $Row->Report->Calculate();
        $Row->SplitStat =& $Row->Report->SplitStat;
        $Row->_STYLE = $Sql->_STYLE;
        $InCampArr[$Sql->Position] = $Row;
        $PrevRow =& $InCampArr[$Sql->Position];
    }
    if (count($InCampArr) > 0) {
        return $InCampArr;
    } else {
        return false;
    }
}
开发者ID:juliogallardo1326,项目名称:proc,代码行数:43,代码来源:admin.split_list.php

示例7: GetPiecesList

function GetPiecesList()
{
    global $Get, $CampId, $Lang, $nsUser;
    $InCampArr = array();
    $Query = "\n\t\tSELECT \n\t\t\tTCP.*,\n\t\t\tTSC.ID AS SUB_CAMP,\n\t\t\tTST.ID AS SPLIT_TEST\n\t\t\tFROM " . PFX . "_tracker_camp_piece TCP\n\t\t\t\tLEFT JOIN " . PFX . "_tracker_sub_campaign TSC\n\t\t\t\t\tON TSC.SUB_ID=TCP.ID\n\t\t\t\tLEFT JOIN " . PFX . "_tracker_split_test TST\n\t\t\t\t\tON TST.SUB_ID=TCP.ID\n\t\t\tWHERE CAMPAIGN_ID={$CampId} \n\t\t\tORDER BY TCP.NAME\n\t";
    $Sql = new Query($Query);
    $Sql->ReadSkinConfig();
    $i = 0;
    while ($Row = $Sql->Row()) {
        $Row->NAME = stripslashes($Row->NAME);
        $Row->DESCRIPTION = stripslashes($Row->DESCRIPTION);
        if ($Row->SUB_CAMP) {
            $Row->_EDITLINK = getURL("sub_camp", "EditId=" . $Row->ID);
            $Row->_CODELINK = getURL("campaign_link", "CampId=" . $Row->ID);
            $Row->_DELETELINK = getURL("sub_camp", "GrpId={$CampId}&DeleteId=" . $Row->ID);
            $Row->_TYPE = $Lang['Campaign'];
            $Row->_STAT_LINK = getURL("paid_constructor", "CampId=" . $Row->ID, "report");
            $Row->Report = new Paid_v2();
            $Row->Report->CampId = $Row->ID;
            $Row->Report->CpId = $Row->COMPANY_ID;
            $Row->Report->ShowPerClick = true;
            $Row->Report->ShowTotalCost = true;
            $Row->Report->DisableAll();
            if ($nsUser->Columns->ROI) {
                $Row->Report->ShowROI = true;
            }
            if ($nsUser->Columns->CONVERSIONS) {
                $Row->Report->ShowActionConv = true;
            }
            if ($nsUser->Columns->CONVERSIONS) {
                $Row->Report->ShowSaleConv = true;
            }
            $Row->Report->Calculate();
            $Row->CampStat =& $Row->Report->CampStat;
        }
        if ($Row->SPLIT_TEST) {
            $Row->_EDITLINK = getURL("split_test", "EditId=" . $Row->ID);
            $Row->_CODELINK = getURL("campaign_link", "SplitId=" . $Row->ID);
            $Row->_DELETELINK = getURL("split_test", "GrpId={$CampId}&DeleteId=" . $Row->ID);
            $Row->_TYPE = $Lang['SplitTest'];
            $Row->_STAT_LINK = getURL("split_test", "SplitId=" . $Row->ID, "report");
            $Row->Report = new SplitStat_v2();
            $Row->Report->SplitId = $Row->ID;
            $Row->Report->CpId = $Row->COMPANY_ID;
            $Row->Report->DisableAll();
            if ($nsUser->Columns->CLICKS) {
                $Row->Report->ShowVisitors = true;
            }
            if ($nsUser->Columns->CONVERSIONS) {
                $Row->Report->ShowActionConv = true;
            }
            if ($nsUser->Columns->CONVERSIONS) {
                $Row->Report->ShowSaleConv = true;
            }
            $Row->Report->Calculate();
            $Row->SplitStat =& $Row->Report->SplitStat;
        }
        if (!$Row->SUB_CAMP && !$Row->SPLIT_TEST) {
            continue;
        }
        $Row->_STYLE = $Sql->_STYLE;
        $InCampArr[$i] = $Row;
        $PrevRow =& $InCampArr[$i];
        $i++;
    }
    $PrevRow->_DOWN = false;
    if (count($InCampArr) > 0) {
        return $InCampArr;
    } else {
        return false;
    }
}
开发者ID:juliogallardo1326,项目名称:proc,代码行数:72,代码来源:admin.incampaign.php

示例8: DeleteCompany

function DeleteCompany($Id, $NoRedir = false)
{
    global $Db, $nsProduct, $Logs, $Lang;
    $Users = array();
    $Query = "SELECT USER_ID FROM " . PFX . "_tracker_user WHERE COMPANY_ID={$Id}";
    $Sql = new Query($Query);
    while ($Row = $Sql->Row()) {
        $Users[] = $Row->USER_ID;
    }
    for ($i = 0; $i < count($Users); $i++) {
        $Query = "DELETE FROM " . PFX . "_system_user WHERE ID = " . $Users[$i];
        $Db->Query($Query);
        $Query = "DELETE FROM " . PFX . "_tracker_user WHERE USER_ID = " . $Users[$i];
        $Db->Query($Query);
        $Query = "DELETE FROM " . PFX . "_tracker_user_column WHERE USER_ID = " . $Users[$i];
        $Db->Query($Query);
        $Query = "DELETE FROM " . PFX . "_tracker_user_settings WHERE USER_ID = " . $Users[$i];
        $Db->Query($Query);
    }
    $Query = "SELECT ID FROM " . PFX . "_tracker_site WHERE COMPANY_ID={$Id}";
    $Sql = new Query($Query);
    while ($Row = $Sql->Row()) {
        DeleteHost($Id, $Row->ID, false, true);
    }
    DeleteCompanyActions($Id);
    DeleteCompanySaleItems($Id);
    $Query = "SELECT ID FROM " . PFX . "_tracker_campaign WHERE PARENT_ID=0 AND COMPANY_ID={$Id}";
    $Sql = new Query($Query);
    while ($Row = $Sql->Row()) {
        DeleteCampaign($Row->ID, true);
    }
    $Query = "DELETE FROM " . PFX . "_tracker_config WHERE COMPANY_ID={$Id}";
    $Db->Query($Query);
    $Query = "DELETE FROM " . PFX . "_tracker_const_group WHERE COMPANY_ID={$Id}";
    $Db->Query($Query);
    $Query = "DELETE FROM " . PFX . "_tracker_user_report WHERE COMPANY_ID={$Id}";
    $Db->Query($Query);
    $Query = "DELETE FROM " . PFX . "_tracker_watch WHERE COMPANY_ID={$Id}";
    $Db->Query($Query);
    DropStatTables($Id);
    $Query = "DELETE FROM " . PFX . "_tracker_client WHERE ID = {$Id}";
    $Db->Query($Query);
    if (!$NoRedir) {
        $nsProduct->Redir("company", "RDlt=1");
    }
}
开发者ID:juliogallardo1326,项目名称:proc,代码行数:46,代码来源:delete.func.php

示例9: GetStat

 function GetStat()
 {
     global $Logs;
     $StatArr = array();
     $GrpItems = array();
     $GrpList = "";
     $SelectStr = "";
     $JoinStr = "";
     $OrderStr = "";
     $GroupStr = "";
     $WhereStr = "";
     $StraightStr = "";
     $LimitStr = "";
     if (count($this->SelectArr) > 0) {
         $SelectStr = implode(", ", $this->SelectArr) . ", ";
     }
     if (count($this->JoinArr) > 0) {
         $JoinStr = implode(" \n", $this->JoinArr);
     }
     if (count($this->OrderArr) > 0) {
         $OrderStr = "ORDER BY " . implode(", ", $this->OrderArr);
     }
     if (count($this->GroupArr) > 0) {
         $GroupStr = "GROUP BY " . implode(", ", $this->GroupArr);
     }
     if (count($this->WhereArr) > 0) {
         $WhereStr = "WHERE " . implode(" AND ", $this->WhereArr);
     }
     if ($this->UseStraight) {
         $StraightStr = "STRAIGHT_JOIN";
     }
     ///////////////////////////////////////////
     if ($this->ShowVisitors) {
         $Query = "\n\t\t\t\tSELECT  {$StraightStr}\n\t\t\t\t\t{$SelectStr}\n\t\t\t\t\tCOUNT(S_LOG.ID) CNT,\n\t\t\t\t\tCOUNT(DISTINCT S_LOG.VISITOR_ID) UNI\n\t\t\t\t\t# выбираем точки входа из лога\n\t\t\t\t\tFROM " . PFX . "_tracker_" . $this->CpId . "_stat_log S_LOG\n\t\t\t\t\t# точки входа определяются путями по сайту\n\t\t\t\t\t# вероятно, с наличием referer set \n\t\t\t\t\t#JOIN " . PFX . "_tracker_stat_path S_PATH\n\t\t\t\t\t#\tON S_PATH.LOG_ID=S_LOG.ID\n\t\t\t\t\tINNER JOIN " . PFX . "_tracker_" . $this->CpId . "_stat_split S_SPLIT\n\t\t\t\t\t\tON S_SPLIT.LOG_ID=S_LOG.ID\n\t\t\t\t{$JoinStr}\n\t\t\t\t{$WhereStr}\n\t\t\t\t{$GroupStr}\n\t\t\t\t{$OrderStr}\n\t\t\t\t{$LimitStr}\n\t\t\t";
         //echo HLSQL($Query);
         $Sql = new Query($Query);
         while ($Row = $Sql->Row()) {
             if ($this->GrpFld) {
                 $Tmp = $this->GrpFld;
                 $Grp = $Row->{$Tmp};
             } else {
                 $Grp = $Sql->Position;
             }
             if ($this->GrpName) {
                 $Name = $this->GrpName;
                 $StatArr[$Grp]['Name'] = $Row->{$Name};
             }
             $StatArr[$Grp]['CntClick'] = $Row->CNT;
             $StatArr[$Grp]['UniClick'] = $Row->UNI;
             $StatArr[$Grp]['CntAction'] = 0;
             $StatArr[$Grp]['UniAction'] = 0;
             $StatArr[$Grp]['CntSale'] = 0;
             $StatArr[$Grp]['UniSale'] = 0;
             $StatArr[$Grp]['Income'] = 0;
             $StatArr[$Grp]['Obj'] = $Row;
             if (count($this->GroupArr)) {
                 $GrpItems[] = $Grp;
             }
         }
         if (count($GrpItems) > 0 && !ValidId($this->GroupArr[0])) {
             $GrpList = "AND " . $this->GroupArr[0] . " IN (" . implode(",", $GrpItems) . ")";
         }
     }
     ///////////////////////////////////////////
     if ($this->ShowActions) {
         $Query = "\n\t\t\t\tSELECT  {$StraightStr}\n\t\t\t\t\t{$SelectStr}\n\t\t\t\t\tCOUNT(S_LOG.ID) CNT,\n\t\t\t\t\tCOUNT(DISTINCT S_LOG.VISITOR_ID) UNI\n\t\t\t\t\t# выбираем точки входа из лога\n\t\t\t\t\tFROM " . PFX . "_tracker_" . $this->CpId . "_stat_log S_LOG\n\t\t\t\t\t# присоединяем ту ветку, которая произошла от S_LOG.ID\n\t\t\t\t\t# по принципу, что в COOKIE_LOG хранится этот самый ID\n\t\t\t\t\tINNER JOIN " . PFX . "_tracker_" . $this->CpId . "_stat_log NODE\n\t\t\t\t\t\tON NODE.COOKIE_LOG=S_LOG.ID\n\t\t\t\t\t# присоединяем таблицу действий\n\t\t\t\t\t# только к выбранным веткам\n\t\t\t\t\tINNER JOIN " . PFX . "_tracker_" . $this->CpId . "_stat_action S_ACTION\n\t\t\t\t\t\tON S_ACTION.LOG_ID=NODE.ID\n\t\t\t\t\t# точки входа определяются путями по сайту\n\t\t\t\t\t# вероятно, с наличием referer set \n\t\t\t\t\t#JOIN " . PFX . "_tracker_stat_path S_PATH\n\t\t\t\t\t#\tON S_PATH.LOG_ID=S_LOG.ID\n\t\t\t\t\tINNER JOIN " . PFX . "_tracker_" . $this->CpId . "_stat_split S_SPLIT\n\t\t\t\t\t\tON S_SPLIT.LOG_ID=S_LOG.ID\n\t\t\t\t{$JoinStr}\n\t\t\t\t{$WhereStr}\n\t\t\t\t{$GrpList}\n\t\t\t\t{$GroupStr}\n\t\t\t\t{$OrderStr}\n\t\t\t\t{$LimitStr}\n\t\t\t";
         //echo HLSQL($Query);
         $Sql = new Query($Query);
         while ($Row = $Sql->Row()) {
             if ($this->GrpFld) {
                 $Tmp = $this->GrpFld;
                 $Grp = $Row->{$Tmp};
             } else {
                 $Grp = $Sql->Position;
             }
             if (!isset($StatArr[$Grp]) && $this->ShowVisitors) {
                 continue;
             }
             if (!$this->ShowVisitors) {
                 if ($this->GrpName) {
                     $Name = $this->GrpName;
                     $StatArr[$Grp]['Name'] = $Row->{$Name};
                 }
             }
             $StatArr[$Grp]['CntAction'] = $Row->CNT;
             $StatArr[$Grp]['UniAction'] = $Row->UNI;
             $StatArr[$Grp]['Obj'] = $Row;
         }
     }
     ///////////////////////////////////////////
     if ($this->ShowSales) {
         $Query = "\n\t\t\t\tSELECT  {$StraightStr}\n\t\t\t\t\t{$SelectStr}\n\t\t\t\t\tCOUNT(S_LOG.ID) CNT,\n\t\t\t\t\tCOUNT(DISTINCT S_LOG.VISITOR_ID) UNI,\n\t\t\t\t\tSUM(S_SALE.COST) AS SALE_SUM\n\t\t\t\t\tFROM " . PFX . "_tracker_" . $this->CpId . "_stat_log S_LOG\n\t\t\t\t\tINNER JOIN " . PFX . "_tracker_" . $this->CpId . "_stat_log NODE\n\t\t\t\t\t\tON NODE.COOKIE_LOG=S_LOG.ID\n\t\t\t\t\tINNER JOIN " . PFX . "_tracker_" . $this->CpId . "_stat_sale S_SALE\n\t\t\t\t\t\tON S_SALE.LOG_ID=NODE.ID\n\t\t\t\t\t#JOIN " . PFX . "_tracker_stat_path S_PATH\n\t\t\t\t\t#\tON S_PATH.LOG_ID=S_LOG.ID\n\t\t\t\t\tINNER JOIN " . PFX . "_tracker_" . $this->CpId . "_stat_split S_SPLIT\n\t\t\t\t\t\tON S_SPLIT.LOG_ID=S_LOG.ID\n\t\t\t\t{$JoinStr}\n\t\t\t\t{$WhereStr}\n\t\t\t\t{$GrpList}\n\t\t\t\t{$GroupStr}\n\t\t\t\t{$OrderStr}\n\t\t\t\t{$LimitStr}\n\t\t\t";
         //echo HLSQL($Query);
         $Sql = new Query($Query);
         while ($Row = $Sql->Row()) {
             if ($this->GrpFld) {
                 $Tmp = $this->GrpFld;
                 $Grp = $Row->{$Tmp};
             } else {
                 $Grp = $Sql->Position;
//.........这里部分代码省略.........
开发者ID:juliogallardo1326,项目名称:proc,代码行数:101,代码来源:split_v2.class.php

示例10: GetTables

 function GetTables()
 {
     $Key = "Tables_in_" . DB_NAME;
     $Query = "show tables";
     $Sql = new Query($Query);
     while ($Row = $Sql->Row()) {
         $Arr[] = $Row->{$Key};
     }
     $this->TablesArr = $Arr;
     return $Arr;
 }
开发者ID:juliogallardo1326,项目名称:proc,代码行数:11,代码来源:db.class.php

示例11: GetCompanies

function GetCompanies()
{
    $CompArr = array();
    $Query = "SELECT * FROM " . PFX . "_tracker_client ORDER BY NAME ASC";
    $Sql = new Query($Query);
    while ($Row = $Sql->Row()) {
        $CompArr[$Sql->Position]['Name'] = htmlspecialchars(stripslashes($Row->NAME));
        $CompArr[$Sql->Position]['Value'] = $Row->ID;
    }
    return $CompArr;
}
开发者ID:juliogallardo1326,项目名称:proc,代码行数:11,代码来源:admin.campaign.php

示例12: UpdatePerClickEndDate

function UpdatePerClickEndDate($EditId)
{
    global $Db;
    $Query = "SELECT * FROM " . PFX . "_tracker_camp_cost WHERE SUB_CAMPAIGN={$EditId} ORDER BY START_DATE";
    $Sql = new Query($Query);
    $Cost = array();
    while ($Row = $Sql->Row()) {
        $Cost[] = $Row;
    }
    for ($i = 0; $i < count($Cost); $i++) {
        if (isset($Cost[$i + 1])) {
            $Query = "UPDATE " . PFX . "_tracker_camp_cost SET END_DATE = '" . $Cost[$i + 1]->START_DATE . "' WHERE ID = " . $Cost[$i]->ID;
            $Db->Query($Query);
        } else {
            $Db->Query("UPDATE " . PFX . "_tracker_camp_cost SET END_DATE ='' WHERE ID =" . $Cost[$i]->ID);
        }
    }
}
开发者ID:juliogallardo1326,项目名称:proc,代码行数:18,代码来源:admin.sub_camp.php

示例13: ClearStat

function ClearStat($EndTime = false, $CpId = false, $SiteId = false)
{
    global $Logs, $Db, $Lang;
    if ($SiteId) {
        $Query = "SELECT MIN(S_LOG.STAMP) FROM " . PFX . "_tracker_" . $CpId . "_stat_log S_LOG WHERE S_LOG.SITE_ID={$SiteId}";
        $StartTime = $Db->ReturnValue($Query);
        DeleteSiteStat($CpId, $SiteId, $StartTime, $EndTime);
    }
    if ($CpId && !$SiteId) {
        $Query = "SELECT MIN(S_LOG.STAMP) FROM " . PFX . "_tracker_" . $CpId . "_stat_log S_LOG INNER JOIN " . PFX . "_tracker_site S ON S.ID=S_LOG.SITE_ID WHERE S.COMPANY_ID={$CpId}";
        $StartTime = $Db->ReturnValue($Query);
        global $ClientsArr;
        if (ValidArr($ClientsArr[$CpId]['Sites']) && count($ClientsArr[$CpId]['Sites']) > 0) {
            foreach ($ClientsArr[$CpId]['Sites'] as $SiteId => $Name) {
                DeleteSiteStat($CpId, $SiteId, $StartTime, $EndTime);
            }
        }
    }
    if (!$CpId && !$SiteId) {
        $Query = "SELECT ID, COMPANY_ID FROM " . PFX . "_tracker_site";
        $Sql = new Query($Query);
        while ($Row = $Sql->Row()) {
            $Query = "SELECT MIN(S_LOG.STAMP) FROM " . PFX . "_tracker_" . $Row->COMPANY_ID . "_stat_log S_LOG";
            $StartTime = $Db->ReturnValue($Query);
            DeleteSiteStat($Row->COMPANY_ID, $Row->ID, $StartTime, $EndTime);
        }
    }
    $Logs->Msg($Lang['StatDeleted']);
}
开发者ID:juliogallardo1326,项目名称:proc,代码行数:29,代码来源:admin.base_stat.php

示例14: GetCampIds

 function GetCampIds($GrpId = false, $CpId = false)
 {
     $Grp = $GrpId ? $GrpId : $this->GrpId;
     $Cp = $CpId ? $CpId : $this->CpId;
     if (!ValidId($Grp) && !ValidId($Cp)) {
         return false;
     }
     if ($Cp) {
         $Fld = "COMPANY_ID";
         $Value = $Cp;
     }
     if ($Grp) {
         $Fld = "CAMPAIGN_ID";
         $Value = $Grp;
     }
     $CampArr = array();
     $SubArr = array();
     $Query = "\n\t\t\tSELECT CP.ID\n\t\t\tFROM " . PFX . "_tracker_camp_piece CP\n\t\t\tWHERE CP.{$Fld}={$Value}\n\t\t";
     $Sql = new Query($Query);
     while ($Row = $Sql->Row()) {
         $CampArr[] = $Row->ID;
     }
     if ($Grp) {
         $Query = "SELECT ID FROM " . PFX . "_tracker_campaign WHERE PARENT_ID={$Grp}";
         $Sql = new Query($Query);
         while ($Row = $Sql->Row()) {
             $SubArr = $this->GetCampIds($Row->ID);
             $CampArr = array_merge($CampArr, $SubArr);
         }
     }
     $CampArr = array_unique($CampArr);
     if (count($CampArr) == 0) {
         $CampArr[] = 0;
     }
     return $CampArr;
 }
开发者ID:juliogallardo1326,项目名称:proc,代码行数:36,代码来源:paid_v2.class.php

示例15: GetFullLicenseArr

function GetFullLicenseArr()
{
    $FullArr = array();
    global $Db, $BF;
    $Query = "SELECT * FROM " . PFX . "_tracker_license";
    $Sql = new Query($Query);
    while ($Row = $Sql->Row()) {
        $Row->KEY_DECODE = $BF->decrypt($Row->LICENSE_KEY);
        $Row->License = GetLicenseText($Row->KEY_DECODE);
        if (!$Row->License) {
            continue;
        }
        foreach ($Row->License as $Key => $Value) {
            $FullArr[$Key][] = $Value;
        }
    }
    return $FullArr;
}
开发者ID:juliogallardo1326,项目名称:proc,代码行数:18,代码来源:license.func.php


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