} // クラスファイル読み込み require_once "./Calculation.php"; // 計算オブジェクト精製 $calc = new Calculation($_REQUEST["access_key"]); //年月日時(yyyymmdd)で渡って来ます $check_date = $_REQUEST["date"]; if (strlen($_REQUEST["date"]) == 6) { // yyyymmで渡ってきた場合 $check_date = $_REQUEST["date"] . "01"; $scope = "month"; } else { $scope = "day"; } // リクエストで送ってきた日付の有効性をチェック if (!$calc->isDate($check_date)) { echo "<?xml version=\"1.0\"?>"; echo "<delyzer>"; echo "<judge>false</judge>b"; echo "</delyzer>"; exit; } //今月、前月、前々月の年月を取得 list($next_year, $next_month) = $calc->getMonthAgoDate($check_date, -1); list($current_year, $current_month) = $calc->getMonthAgoDate($check_date, 0); list($two_year, $two_month) = $calc->getMonthAgoDate($check_date, 1); list($three_year, $three_month) = $calc->getMonthAgoDate($check_date, 2); $next_month = $next_year . $next_month; $current_month = $current_year . $current_month; $two_month = $two_year . $two_month; $three_month = $three_year . $three_month;
<?php // delyzerからのアクセス認証キー if (!$_REQUEST["access_key"]) { echo "<?xml version=\"1.0\"?>"; echo "<delyzer>"; echo "<judge>false</judge>"; echo "</delyzer>"; exit; } // クラスファイル読み込み require_once "./Calculation.php"; // 計算オブジェクト精製 $calc = new Calculation($_REQUEST["access_key"]); // リクエストで送ってきた日付の有効性をチェック if (!$calc->isDate($_REQUEST["date"])) { echo "<?xml version=\"1.0\"?>"; echo "<delyzer>"; echo "<judge>false</judge>"; echo "</delyzer>"; exit; } //年月日時(例:2007091816)で渡って来ます $check_date = $_REQUEST["date"]; //今月、前月、前々月の年月を取得 list($next_month_year, $next_month_month) = $calc->getMonthAgoDate($check_date, -1); list($one_month_year, $one_month_month) = $calc->getMonthAgoDate($check_date, 0); list($two_month_year, $two_month_month) = $calc->getMonthAgoDate($check_date, 1); list($three_month_year, $three_month_month) = $calc->getMonthAgoDate($check_date, 2); //print("next_month_year=".$next_month_year."<br>"); //print("next_month_month=".$next_month_month."<br>");
$i_female_uriage = 0; // 女性指定日売上 $i_total_uriage = 0; // 男女指定日売上 $i_man_regist_num = 0; // 男性指定日登録数 $i_female_regist_num = 0; // 女性指定日登録数 $i_total_regist_num = 0; // 男女指定日登録数 $site_code = $_REQUEST['site_cd']; $targetDate = $_REQUEST['target_date']; if (!$site_code) { exit("siteCdError:" . __LINE__); } if (!$calc->isDate($targetDate)) { exit("targetDateError:" . __LINE__); } $targetDateYear = substr($targetDate, 0, 4); $targetDateMonth = substr($targetDate, 4, 2); $targetDateDay = substr($targetDate, 6, 2); $reformTargetDate = $targetDateYear . "-" . $targetDateMonth . "-" . $targetDateDay; //------------トップページのアクセス数を取得---------------------- $access_sql = "SELECT sum(access_count) AS total_access FROM media_analyze" . " WHERE analyze_datetime >= '" . $reformTargetDate . " 00:00:00'" . " AND analyze_datetime <= '" . $reformTargetDate . " 23:59:59'" . " AND disable = 0 "; $access_result = $calc->executeQuery($access_sql); $resultAccessData = $calc->fetchObject($access_result); $i_total_access = $resultAccessData->total_access; if (!$i_total_access) { exit("topCntError:" . __LINE__); } //--------------対象日時の入金額取得---------------------------