public function getListNotificationType($intPage, $orderBy = 'NotificationTypeID', $whereClause) { if ($whereClause) { $whereClause = 'WHERE' + $whereClause; } if ($orderBy) { $orderBy = 'ORDER BY' + $orderBy; } $strSQL .= global_common::prepareQuery(global_common::SQL_SELECT_FREE, array('*', self::TBL_SL_NOTIFICATION_TYPE, $orderBy . ' ' . $whereClause . ' limit ' . ($intPage - 1) * self::NUM_PER_PAGE . ',' . self::NUM_PER_PAGE)); //echo 'sql:'.$strSQL; $arrResult = $this->_objConnection->selectCommand($strSQL); //print_r($arrResult); $strHTML = '<table class="tbl-list"> <thead> <td>NotificationTypeID</td> <td>NotificationTypeName</td> <td>CreatedBy</td> <td>CreatedDate</td> <td>ModifiedBy</td> <td>ModifiedDate</td> <td>DeletedBy</td> <td>DeletedDate</td> <td>IsDeleted</td> <td>Status</td> </thead> <tbody>'; $icount = count($arrmenu); for ($i = 0; $i < $icount; $i++) { $strHTML .= '<tr class="' . ($i % 2 == 0 ? 'even' : 'odd') . '"> <td>' . $arrResult[$i]['NotificationTypeID'] . '</td> <td>' . $arrResult[$i]['NotificationTypeName'] . '</td> <td>' . $arrResult[$i]['CreatedBy'] . '</td> <td>' . $arrResult[$i]['CreatedDate'] . '</td> <td>' . $arrResult[$i]['ModifiedBy'] . '</td> <td>' . $arrResult[$i]['ModifiedDate'] . '</td> <td>' . $arrResult[$i]['DeletedBy'] . '</td> <td>' . $arrResult[$i]['DeletedDate'] . '</td> <td><input type="checkbox" onclick="_objNotificationType.showHide(\'' . $arrResult[$i]['NotificationTypeID'] . '\',\'' . $arrResult[$i]['name'] . '\',this)" ' . ($arrResult[$i]['IsDeleted'] ? '' : 'checked=checked') . ' /></td> <td class="lastCell">' . $arrResult[$i]['Status'] . '</td> </tr>'; } $strHTML .= '</tbody></table>'; $strHTML .= "<div>" . global_common::getPagingHTMLByNum($intPage, self::NUM_PER_PAGE, global_common::getTotalRecord(self::TBL_SL_NOTIFICATION_TYPE, $this->_objConnection), "_objMenu.changePage") . "</div>"; return $strHTML; }
public function getListUser($intPage, $orderBy = 'UserID', $whereClause) { if ($whereClause) { $whereClause = 'WHERE' + $whereClause; } if ($orderBy) { $orderBy = 'ORDER BY' + $orderBy; } $strSQL .= global_common::prepareQuery(global_common::SQL_SELECT_FREE, array('*', self::TBL_SL_USER, $orderBy . ' ' . $whereClause . ' limit ' . ($intPage - 1) * self::NUM_PER_PAGE . ',' . self::NUM_PER_PAGE)); //echo 'sql:'.$strSQL; $arrResult = $this->_objConnection->selectCommand($strSQL); //print_r($arrResult); $strHTML = '<table class="tbl-list"> <thead> <td>UserID</td> <td>UserName</td> <td>Password</td> <td>Fullname</td> <td>BirthDate</td> <td>Address</td> <td>Phone</td> <td>Email</td> <td>Sex</td> <td>Identity</td> <td>RoleID</td> <td>UserRankID</td> <td>Avatar</td> <td>AccountID</td> <td>IsActived</td> </thead> <tbody>'; $icount = count($arrmenu); for ($i = 0; $i < $icount; $i++) { $strHTML .= '<tr class="' . ($i % 2 == 0 ? 'even' : 'odd') . '"> <td>' . $arrResult[$i]['UserID'] . '</td> <td>' . $arrResult[$i]['UserName'] . '</td> <td>' . $arrResult[$i]['Password'] . '</td> <td>' . $arrResult[$i]['Fullname'] . '</td> <td>' . $arrResult[$i]['BirthDate'] . '</td> <td>' . $arrResult[$i]['Address'] . '</td> <td>' . $arrResult[$i]['Phone'] . '</td> <td>' . $arrResult[$i]['Email'] . '</td> <td>' . $arrResult[$i]['Sex'] . '</td> <td>' . $arrResult[$i]['Identity'] . '</td> <td>' . $arrResult[$i]['RoleID'] . '</td> <td>' . $arrResult[$i]['UserRankID'] . '</td> <td>' . $arrResult[$i]['Avatar'] . '</td> <td>' . $arrResult[$i]['AccountID'] . '</td> <td class="lastCell"><input type="checkbox" onclick="_objUser.showHide(\'' . $arrResult[$i]['UserID'] . '\',\'' . $arrResult[$i]['name'] . '\',this)" ' . ($arrResult[$i]['IsDeleted'] ? '' : 'checked=checked') . ' /></td> </tr>'; } $strHTML .= '</tbody></table>'; $strHTML .= "<div>" . global_common::getPagingHTMLByNum($intPage, self::NUM_PER_PAGE, global_common::getTotalRecord(self::TBL_SL_USER, $this->_objConnection), "_objMenu.changePage") . "</div>"; return $strHTML; }
public function getListEvaluation($intPage, $orderBy = 'EvaluationID', $whereClause) { if ($whereClause) { $whereClause = 'WHERE' + $whereClause; } if ($orderBy) { $orderBy = 'ORDER BY' + $orderBy; } $strSQL .= global_common::prepareQuery(global_common::SQL_SELECT_FREE, array('*', self::TBL_SL_EVALUATION, $orderBy . ' ' . $whereClause . ' limit ' . ($intPage - 1) * self::NUM_PER_PAGE . ',' . self::NUM_PER_PAGE)); //echo 'sql:'.$strSQL; $arrResult = $this->_objConnection->selectCommand($strSQL); //print_r($arrResult); $strHTML = '<table class="tbl-list"> <thead> <td>ArticleID</td> <td>EvaluationID</td> <td>NumEvaluation</td> <td>EvaluatedBy</td> <td>LastEvaluated</td> </thead> <tbody>'; $icount = count($arrmenu); for ($i = 0; $i < $icount; $i++) { $strHTML .= '<tr class="' . ($i % 2 == 0 ? 'even' : 'odd') . '"> <td>' . $arrResult[$i]['ArticleID'] . '</td> <td>' . $arrResult[$i]['EvaluationID'] . '</td> <td>' . $arrResult[$i]['NumEvaluation'] . '</td> <td>' . $arrResult[$i]['EvaluatedBy'] . '</td> <td class="lastCell">' . $arrResult[$i]['LastEvaluated'] . '</td> </tr>'; } $strHTML .= '</tbody></table>'; $strHTML .= "<div>" . global_common::getPagingHTMLByNum($intPage, self::NUM_PER_PAGE, global_common::getTotalRecord(self::TBL_SL_EVALUATION, $this->_objConnection), "_objMenu.changePage") . "</div>"; return $strHTML; }
public function getListPartner($intPage, $orderBy = 'ParterID', $whereClause) { if ($whereClause) { $whereClause = 'WHERE' + $whereClause; } if ($orderBy) { $orderBy = 'ORDER BY' + $orderBy; } $strSQL .= global_common::prepareQuery(global_common::SQL_SELECT_FREE, array('*', self::TBL_SL_PARTNER, $orderBy . ' ' . $whereClause . ' limit ' . ($intPage - 1) * self::NUM_PER_PAGE . ',' . self::NUM_PER_PAGE)); //echo 'sql:'.$strSQL; $arrResult = $this->_objConnection->selectCommand($strSQL); //print_r($arrResult); $strHTML = '<table class="tbl-list"> <thead> <td>ParterID</td> <td>UserID</td> <td>PartnerName</td> <td>Company</td> <td>Address1</td> <td>AddressName1</td> <td>Address2</td> <td>AddressName2</td> <td>Address3</td> <td>AddressName3</td> <td>Address4</td> <td>AddressName4</td> <td>Address5</td> <td>AddressName5</td> <td>Email1</td> <td>EmailName1</td> <td>Email2</td> <td>EmailName2</td> <td>Email3</td> <td>EmailName3</td> <td>Email4</td> <td>EmailName4</td> <td>Email5</td> <td>EmailName5</td> <td>Phone1</td> <td>PhoneName1</td> <td>Phone2</td> <td>PhoneName2</td> <td>Phone3</td> <td>PhoneName3</td> <td>Phone4</td> <td>PhoneName4</td> <td>Phone5</td> <td>PhoneName5</td> <td>Fax1</td> <td>FaxName1</td> <td>Fax2</td> <td>FaxName2</td> <td>Fax3</td> <td>FaxName3</td> <td>Fax4</td> <td>FaxName4</td> <td>Fax5</td> <td>FaxName5</td> <td>Website1</td> <td>WebsiteName1</td> <td>Website2</td> <td>WebsiteName2</td> <td>Website3</td> <td>WebsiteName3</td> <td>Website4</td> <td>WebsiteName4</td> <td>Website5</td> <td>WebsiteName5</td> <td>TaxNumber</td> <td>AccountNumber</td> <td>CreatedBy</td> <td>CreatedDate</td> <td>ModifiedBy</td> <td>ModifiedDate</td> <td>DeletedBy</td> <td>DeletedDate</td> <td>Status</td> <td>IsDeleted</td> </thead> <tbody>'; $icount = count($arrmenu); for ($i = 0; $i < $icount; $i++) { $strHTML .= '<tr class="' . ($i % 2 == 0 ? 'even' : 'odd') . '"> <td>' . $arrResult[$i]['ParterID'] . '</td> <td>' . $arrResult[$i]['UserID'] . '</td> <td>' . $arrResult[$i]['PartnerName'] . '</td> <td>' . $arrResult[$i]['Company'] . '</td> <td>' . $arrResult[$i]['Address1'] . '</td> <td>' . $arrResult[$i]['AddressName1'] . '</td> <td>' . $arrResult[$i]['Address2'] . '</td> <td>' . $arrResult[$i]['AddressName2'] . '</td> <td>' . $arrResult[$i]['Address3'] . '</td> <td>' . $arrResult[$i]['AddressName3'] . '</td> <td>' . $arrResult[$i]['Address4'] . '</td> <td>' . $arrResult[$i]['AddressName4'] . '</td> <td>' . $arrResult[$i]['Address5'] . '</td> <td>' . $arrResult[$i]['AddressName5'] . '</td> <td>' . $arrResult[$i]['Email1'] . '</td> <td>' . $arrResult[$i]['EmailName1'] . '</td> <td>' . $arrResult[$i]['Email2'] . '</td> <td>' . $arrResult[$i]['EmailName2'] . '</td> <td>' . $arrResult[$i]['Email3'] . '</td> <td>' . $arrResult[$i]['EmailName3'] . '</td> <td>' . $arrResult[$i]['Email4'] . '</td> <td>' . $arrResult[$i]['EmailName4'] . '</td> <td>' . $arrResult[$i]['Email5'] . '</td> <td>' . $arrResult[$i]['EmailName5'] . '</td> <td>' . $arrResult[$i]['Phone1'] . '</td> <td>' . $arrResult[$i]['PhoneName1'] . '</td> <td>' . $arrResult[$i]['Phone2'] . '</td> <td>' . $arrResult[$i]['PhoneName2'] . '</td> <td>' . $arrResult[$i]['Phone3'] . '</td> <td>' . $arrResult[$i]['PhoneName3'] . '</td> <td>' . $arrResult[$i]['Phone4'] . '</td> <td>' . $arrResult[$i]['PhoneName4'] . '</td> <td>' . $arrResult[$i]['Phone5'] . '</td> <td>' . $arrResult[$i]['PhoneName5'] . '</td> <td>' . $arrResult[$i]['Fax1'] . '</td> <td>' . $arrResult[$i]['FaxName1'] . '</td> <td>' . $arrResult[$i]['Fax2'] . '</td> <td>' . $arrResult[$i]['FaxName2'] . '</td> <td>' . $arrResult[$i]['Fax3'] . '</td> <td>' . $arrResult[$i]['FaxName3'] . '</td> <td>' . $arrResult[$i]['Fax4'] . '</td> <td>' . $arrResult[$i]['FaxName4'] . '</td> <td>' . $arrResult[$i]['Fax5'] . '</td> <td>' . $arrResult[$i]['FaxName5'] . '</td> <td>' . $arrResult[$i]['Website1'] . '</td> <td>' . $arrResult[$i]['WebsiteName1'] . '</td> <td>' . $arrResult[$i]['Website2'] . '</td> <td>' . $arrResult[$i]['WebsiteName2'] . '</td> <td>' . $arrResult[$i]['Website3'] . '</td> <td>' . $arrResult[$i]['WebsiteName3'] . '</td> <td>' . $arrResult[$i]['Website4'] . '</td> <td>' . $arrResult[$i]['WebsiteName4'] . '</td> <td>' . $arrResult[$i]['Website5'] . '</td> <td>' . $arrResult[$i]['WebsiteName5'] . '</td> <td>' . $arrResult[$i]['TaxNumber'] . '</td> <td>' . $arrResult[$i]['AccountNumber'] . '</td> <td>' . $arrResult[$i]['CreatedBy'] . '</td> <td>' . $arrResult[$i]['CreatedDate'] . '</td> <td>' . $arrResult[$i]['ModifiedBy'] . '</td> <td>' . $arrResult[$i]['ModifiedDate'] . '</td> <td>' . $arrResult[$i]['DeletedBy'] . '</td> <td>' . $arrResult[$i]['DeletedDate'] . '</td> <td>' . $arrResult[$i]['Status'] . '</td> <td class="lastCell"><input type="checkbox" onclick="_objPartner.showHide(\'' . $arrResult[$i]['ParterID'] . '\',\'' . $arrResult[$i]['name'] . '\',this)" ' . ($arrResult[$i]['IsDeleted'] ? '' : 'checked=checked') . ' /></td> </tr>'; } $strHTML .= '</tbody></table>'; $strHTML .= "<div>" . global_common::getPagingHTMLByNum($intPage, self::NUM_PER_PAGE, global_common::getTotalRecord(self::TBL_SL_PARTNER, $this->_objConnection), "_objMenu.changePage") . "</div>"; return $strHTML; }
} else { echo 'Add ' . $storeName . ' failed'; echo '<br>'; } } else { echo 'Exist reference id:' . $subStoreRefID . '<br>'; } } } } //return; } } } else { if ($_pgR["act"] == "fixlatlong") { $total = global_common::getTotalRecord(Model_Store::TBL_SL_STORE, $objConnection); for ($index = 1; $index <= $total / Model_Store::NUM_PER_PAGE + 1; $index++) { $allStores = $objStore->getAllStore($index); //print_r($allStores); //break; foreach ($allStores as $store) { // print_r($store); //add urlencode to your address $rawAddr = $store[global_mapping::Address] . ', ' . $store[global_mapping::DistrictName] . ', ' . str_replace("TP.", "", $store[global_mapping::CityName]) . ', Việt Nam'; //$address = urlencode($rawAddr); //$address = str_replace(" ", "+", $address); //echo $rawAddr; if ($store[global_mapping::Latitude] == '10.8230990000' && $store[global_mapping::Longitude] == '106.6296640000') { echo '<br>Start get lat long: ' . $rawAddr; //$json = file_get_contents("http://maps.google.com/maps/api/geocode/json?address=$address&sensor=false"); //$json = json_decode($json);
public function getListProductPrice($intPage, $orderBy = 'ProductPriceID', $whereClause) { if ($whereClause) { $whereClause = 'WHERE' + $whereClause; } if ($orderBy) { $orderBy = 'ORDER BY' + $orderBy; } $strSQL .= global_common::prepareQuery(global_common::SQL_SELECT_FREE, array('*', self::TBL_SL_PRODUCT_PRICE, $orderBy . ' ' . $whereClause . ' limit ' . ($intPage - 1) * self::NUM_PER_PAGE . ',' . self::NUM_PER_PAGE)); //echo 'sql:'.$strSQL; $arrResult = $this->_objConnection->selectCommand($strSQL); //print_r($arrResult); $strHTML = '<table class="tbl-list"> <thead> <td>ProductPriceID</td> <td>ProductID</td> <td>Retailer</td> <td>ProductLink</td> <td>TypeID</td> <td>Order</td> <td>StatusID</td> <td>Status</td> </thead> <tbody>'; $icount = count($arrmenu); for ($i = 0; $i < $icount; $i++) { $strHTML .= '<tr class="' . ($i % 2 == 0 ? 'even' : 'odd') . '"> <td>' . $arrResult[$i]['ProductPriceID'] . '</td> <td>' . $arrResult[$i]['ProductID'] . '</td> <td>' . $arrResult[$i]['Retailer'] . '</td> <td>' . $arrResult[$i]['ProductLink'] . '</td> <td>' . $arrResult[$i]['TypeID'] . '</td> <td>' . $arrResult[$i]['Order'] . '</td> <td>' . $arrResult[$i]['StatusID'] . '</td> <td class="lastCell">' . $arrResult[$i]['Status'] . '</td> </tr>'; } $strHTML .= '</tbody></table>'; $strHTML .= "<div>" . global_common::getPagingHTMLByNum($intPage, self::NUM_PER_PAGE, global_common::getTotalRecord(self::TBL_SL_PRODUCT_PRICE, $this->_objConnection), "_objMenu.changePage") . "</div>"; return $strHTML; }
public function getListRetailer($intPage, $orderBy = 'RetailerID', $whereClause) { if ($whereClause) { $whereClause = 'WHERE' + $whereClause; } if ($orderBy) { $orderBy = 'ORDER BY' + $orderBy; } $strSQL .= global_common::prepareQuery(global_common::SQL_SELECT_FREE, array('*', self::TBL_SL_RETAILER, $orderBy . ' ' . $whereClause . ' limit ' . ($intPage - 1) * self::NUM_PER_PAGE . ',' . self::NUM_PER_PAGE)); //echo 'sql:'.$strSQL; $arrResult = $this->_objConnection->selectCommand($strSQL); //print_r($arrResult); $strHTML = '<table class="tbl-list"> <thead> <td>RetailerID</td> <td>ProductID</td> <td>ProductStatusID</td> <td>Price</td> <td>Amount</td> <td>Remaining</td> <td>ImageLink</td> <td>ShipTypeID</td> <td>ShipingCost</td> <td>ShippingDay</td> <td>PaymentModeID</td> <td>Description</td> <td>CreatedBy</td> <td>CreatedDate</td> <td>ModifiedBy</td> <td>ModifiedDate</td> <td>DeletedBy</td> <td>DeletedDate</td> <td>IsDeleted</td> <td>StatusID</td> <td>Status</td> </thead> <tbody>'; $icount = count($arrmenu); for ($i = 0; $i < $icount; $i++) { $strHTML .= '<tr class="' . ($i % 2 == 0 ? 'even' : 'odd') . '"> <td>' . $arrResult[$i]['RetailerID'] . '</td> <td>' . $arrResult[$i]['ProductID'] . '</td> <td>' . $arrResult[$i]['ProductStatusID'] . '</td> <td>' . $arrResult[$i]['Price'] . '</td> <td>' . $arrResult[$i]['Amount'] . '</td> <td>' . $arrResult[$i]['Remaining'] . '</td> <td>' . $arrResult[$i]['ImageLink'] . '</td> <td>' . $arrResult[$i]['ShipTypeID'] . '</td> <td>' . $arrResult[$i]['ShipingCost'] . '</td> <td>' . $arrResult[$i]['ShippingDay'] . '</td> <td>' . $arrResult[$i]['PaymentModeID'] . '</td> <td>' . $arrResult[$i]['Description'] . '</td> <td>' . $arrResult[$i]['CreatedBy'] . '</td> <td>' . $arrResult[$i]['CreatedDate'] . '</td> <td>' . $arrResult[$i]['ModifiedBy'] . '</td> <td>' . $arrResult[$i]['ModifiedDate'] . '</td> <td>' . $arrResult[$i]['DeletedBy'] . '</td> <td>' . $arrResult[$i]['DeletedDate'] . '</td> <td><input type="checkbox" onclick="_objRetailer.showHide(\'' . $arrResult[$i]['RetailerID'] . '\',\'' . $arrResult[$i]['name'] . '\',this)" ' . ($arrResult[$i]['IsDeleted'] ? '' : 'checked=checked') . ' /></td> <td>' . $arrResult[$i]['StatusID'] . '</td> <td class="lastCell">' . $arrResult[$i]['Status'] . '</td> </tr>'; } $strHTML .= '</tbody></table>'; $strHTML .= "<div>" . global_common::getPagingHTMLByNum($intPage, self::NUM_PER_PAGE, global_common::getTotalRecord(self::TBL_SL_RETAILER, $this->_objConnection), "_objMenu.changePage") . "</div>"; return $strHTML; }
public function getListStore($intPage, $orderBy = '', $whereClause) { if ($whereClause) { $whereClause = 'WHERE' + $whereClause; } if ($orderBy) { $orderBy = 'ORDER BY' + $orderBy; } $strSQL .= global_common::prepareQuery(global_common::SQL_SELECT_FREE, array('*', self::TBL_SL_STORE, $orderBy . ' ' . $whereClause . ' limit ' . ($intPage - 1) * self::NUM_PER_PAGE . ',' . self::NUM_PER_PAGE)); //echo 'sql:'.$strSQL; $arrResult = $this->_objConnection->selectCommand($strSQL); //print_r($arrResult); $strHTML = '<table class="tbl-list"> <thead> <td>StoreID</td> <td>Name</td> <td>Address</td> <td>DistictID</td> <td>CityID</td> <td>Phone</td> <td>SpecialDesc</td> <td>Latitude</td> <td>Longitude</td> <td>WorkingDay</td> <td>MainCategoryId</td> <td>StoreIcon</td> <td>StoreImage</td> <td>Status</td> <td>CreatedBy</td> <td>CreateDate</td> <td>UpdatedBy</td> <td>UpdatedDate</td> <td>DeletedBy</td> <td>DeletedDate</td> </thead> <tbody>'; $icount = count($arrmenu); for ($i = 0; $i < $icount; $i++) { $strHTML .= '<tr class="' . ($i % 2 == 0 ? 'even' : 'odd') . '"> <td>' . $arrResult[$i]['StoreID'] . '</td> <td>' . $arrResult[$i]['Name'] . '</td> <td>' . $arrResult[$i]['Address'] . '</td> <td>' . $arrResult[$i]['DistictID'] . '</td> <td>' . $arrResult[$i]['CityID'] . '</td> <td>' . $arrResult[$i]['Phone'] . '</td> <td>' . $arrResult[$i]['SpecialDesc'] . '</td> <td>' . $arrResult[$i]['Latitude'] . '</td> <td>' . $arrResult[$i]['Longitude'] . '</td> <td>' . $arrResult[$i]['WorkingDay'] . '</td> <td>' . $arrResult[$i]['MainCategoryId'] . '</td> <td>' . $arrResult[$i]['StoreIcon'] . '</td> <td>' . $arrResult[$i]['StoreImage'] . '</td> <td>' . $arrResult[$i]['Status'] . '</td> <td>' . $arrResult[$i]['CreatedBy'] . '</td> <td>' . $arrResult[$i]['CreateDate'] . '</td> <td>' . $arrResult[$i]['UpdatedBy'] . '</td> <td>' . $arrResult[$i]['UpdatedDate'] . '</td> <td>' . $arrResult[$i]['DeletedBy'] . '</td> <td class="lastCell">' . $arrResult[$i]['DeletedDate'] . '</td> </tr>'; } $strHTML .= '</tbody></table>'; $strHTML .= "<div>" . global_common::getPagingHTMLByNum($intPage, self::NUM_PER_PAGE, global_common::getTotalRecord(self::TBL_SL_STORE, $this->_objConnection), "_objMenu.changePage") . "</div>"; return $strHTML; }