$nsProduct->SSL_LINK = $Db->ReturnValue("SELECT SSL_LINK FROM " . PFX . "_tracker_config WHERE COMPANY_ID=0"); if (!$nsProduct->SSL_LINK) { $UseSSL = false; } else { $UseSSL = true; } $Settings = GetSettings(); $VarCamp = ValidVar($Settings['All']->VAR_CAMPAIGN, "c"); $VarKw = ValidVar($Settings['All']->VAR_KW, "kw"); $VarKeyword = ValidVar($Settings['All']->VAR_KEYWORD, "k"); $LinkArr = array(); $AllowCSV = false; ///////////////////////////////////////////// ///////// call any process functions if ($GenCode) { GenLink($GLink, $GKey); } ///////////////////////////////////////////// ///////// display section here $CampArr = array(); $Query = "\n\tSELECT CP.*, C.NAME AS GRP_NAME\n\tFROM " . PFX . "_tracker_camp_piece CP\n\t\tINNER JOIN " . PFX . "_tracker_sub_campaign SC\n\t\t\tON SC.SUB_ID=CP.ID\n\t\tLEFT JOIN " . PFX . "_tracker_campaign C\n\t\t\tON C.ID=CP.CAMPAIGN_ID\n\tWHERE CP.COMPANY_ID={$CpId}\n\tORDER BY C.NAME, CP.NAME\n"; $Sql = new Query($Query); while ($Row = $Sql->Row()) { if ($Row->GRP_NAME) { $Row->NAME = $Row->GRP_NAME . " » " . $Row->NAME; } $CampArr[] = $Row; } $SplitArr = array(); $Query = "\n\tSELECT CP.*\n\tFROM " . PFX . "_tracker_camp_piece CP\n\t\tINNER JOIN " . PFX . "_tracker_split_test ST\n\t\t\tON ST.SUB_ID=CP.ID\n\tWHERE CP.COMPANY_ID={$CpId}\n\tORDER BY CP.NAME\n"; $Sql = new Query($Query);
///////// call any process functions if (!$nsUser->DEMO) { if (ValidId($SubCamp->ID) && ValidVar($MoveCampTo) && $MoveCampTo != $SubCamp->CAMPAIGN_ID) { MoveSubCamp($EditId, $MoveCampTo); } if (ValidId($EditId) && isset($EditArr) && is_array($EditArr)) { UpdateSubCampaign($EditId, $EditArr); } if (isset($EditId) && $EditId == "new" && isset($EditArr) && ValidId($GrpId)) { CreateNewSubCampaign($GrpId, $EditArr); } if (ValidId($DeleteId)) { DeleteSubCampaign($CpId, $DeleteId); } if (isset($GenCode) && $GenCode == 1) { GenLink(); } if (ValidId($EditCostId) && ValidArr($EditCost)) { UpdateCost($EditCostId, $EditCost); } if (ValidVar($EditCostId) == "new" && ValidArr($EditCost)) { CreateCost($EditCost); } if (ValidVar($UpdateSum) == 1) { UpdateSumThis($SumThis); } if (ValidId($DelCostId)) { DeleteCost($DelCostId); } } /////////////////////////////////////////////