Пример #1
0
    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;
    }
Пример #2
0
        if ($item[global_mapping::IsDeleted] == true) {
            //echo '<a href="javascript:product.activateProduct(\''.$item[global_mapping::ProductID].'\',0)" class="btn btn-mini">Phục hồi</a>';
        } else {
            echo '<a href="javascript:product.activateProduct(\'' . $item[global_mapping::ProductID] . '\',1)" class="btn btn-mini">Xóa</a>';
        }
        //echo '										<a href="javascript:article.activeArticle(\''.$item[global_mapping::ArticleID].'\',0)" class="btn btn-mini">Xóa</a>';
        echo '									</td>';
        echo '								</tr>';
    }
}
?>
										</tbody>
									</table>
									</div>			
<?php 
echo global_common::getPagingHTMLByNum($page, Model_Product::NUM_PER_PAGE, $total, 'core.util.changePage', 'form-member-product');
?>
		
								</div>	
													
							</div>
                   
                        </div>
                    
					</div>
                </div>
                <!--end span9-->
            </div>
        </div>
</div>
<script language="javascript" type="text/javascript">
Пример #3
0
        echo '</td>';
        echo '<td>';
        echo $item[global_mapping::CreatedBy][global_mapping::UserName];
        echo '</td>';
        echo '<td>';
        echo global_common::formatDateTimeVN($item[global_mapping::CreatedDate]);
        echo '</td>';
        echo '<td>';
        echo global_common::formatDateTimeVN($item[global_mapping::ModifiedDate]);
        echo '</td>';
        echo '<td style="padding:0;width:180px">';
        echo '<a href="' . global_common::buildRetailerLink($item[global_mapping::RetailerID], true) . '" target="_blank" class="btn btn-mini"> View</a> ';
        if ($item[global_mapping::StatusID] == global_common::STATUS_INACTIVE) {
            echo '<a href="javascript:retailer.activateRetailer(\'' . $item[global_mapping::RetailerID] . '\',' . global_common::STATUS_ACTIVE . ', retailer.AdminPage)" class="btn btn-mini">Bán lại</a>';
        } else {
            echo '<a href="javascript:retailer.activateRetailer(\'' . $item[global_mapping::RetailerID] . '\',' . global_common::STATUS_INACTIVE . ', retailer.AdminPage)" class="btn btn-mini">Dừng bán</a>';
        }
        echo '</td>';
        echo '</tr>';
    }
    echo '</table>';
    echo global_common::getPagingHTMLByNum($page, Model_Retailer::NUM_PER_PAGE, $total, 'core.util.changePage', 'admin_price');
}
?>
				</div>
					</div>
		</div>
	</div>
</div>
<?php 
include_once 'include/_admin_footer.inc';
Пример #4
0
    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;
    }
Пример #5
0
    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;
    }
Пример #6
0
        echo '<td>';
        echo global_common::formatDateTimeVN($item[global_mapping::ModifiedDate]);
        echo '</td>';
        echo '<td style="padding:0;width:200px">';
        echo '<a href="' . global_common::buildProductLink($item[global_mapping::ProductID], true) . '" target="_blank" class="btn btn-mini"> View</a> ';
        echo '<a href="javascript:product.showPopupEditStorePrice(\'' . $item[global_mapping::ProductID] . '\',\'' . str_replace("'", " ", $item[global_mapping::ProductName]) . '\',\'modal-add\', product.AdminPage)" class="btn btn-mini">Store Price</a>';
        if ($item[global_mapping::IsDeleted] == true) {
            echo '<a href="javascript:product.activateProduct(\'' . $item[global_mapping::ProductID] . '\',0, product.AdminPage)" class="btn btn-mini">Bán lại</a>';
        } else {
            echo '<a href="javascript:product.activateProduct(\'' . $item[global_mapping::ProductID] . '\',1, product.AdminPage)" class="btn btn-mini">Dừng bán</a>';
        }
        echo '</td>';
        echo '</tr>';
    }
    echo '</table>';
    echo global_common::getPagingHTMLByNum($page, Model_ProductPrice::NUM_PER_PAGE, $total, 'core.util.changePage', 'admin_product');
}
?>
				</div>
					</div>
		</div>
	</div>
</div>
<?php 
include_once 'include/_admin_footer.inc';
?>

<input type="hidden" id="adddocmode" name="adddocmode" value="" />
<input type="hidden" id="ProductID" name="ProductID" value="" />
<input type="hidden" id="ProductPriceID" name="ProductPriceID" value="" />
<div id="modal-add" class="modal hide fade" tabindex="-1" data-width="800" data-keyboard="false"  aria-hidden="true" data-backdrop="static">
Пример #7
0
        echo '</td>';
        echo '<td>';
        echo global_common::formatDateVN($item[global_mapping::EndDate]);
        echo '</td>';
        echo '<td>';
        echo global_common::formatDateVN($item[global_mapping::CreatedDate]);
        echo '</td>';
        echo '<td>';
        echo global_common::formatDateVN($item[global_mapping::ModifiedDate]);
        echo '</td>';
        echo '<td style="padding:0;width:180px">';
        echo '<a href="../article_detail.php?aid=' . $item[global_mapping::ArticleID] . '" target="_blank" class="btn btn-mini"> View</a> ';
        if (!$item[global_mapping::Status]) {
            echo '<a href="javascript:article.activeArticle(\'' . $item[global_mapping::ArticleID] . '\',1)" class="btn btn-mini">Active</a> ';
        } else {
            echo '<a href="javascript:article.activeArticle(\'' . $item[global_mapping::ArticleID] . '\',0)" class="btn btn-mini">Deactive</a>';
        }
        echo '</td>';
        echo '</tr>';
    }
    echo '</table>';
    echo global_common::getPagingHTMLByNum($page, Model_Article::NUM_PER_PAGE, $total, "article.SearchAdmin");
}
?>
				</div>
					</div>
		</div>
	</div>
</div>
<?php 
include_once 'include/_admin_footer.inc';
Пример #8
0
    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;
    }
Пример #9
0
        echo '</td>';
        echo '<td>';
        echo global_common::formatDateVN($item[global_mapping::EndDate]);
        echo '</td>';
        echo '<td style="padding:0;width:180px">';
        echo '<a href="javascript:advertising.showPopupEdit(\'' . $item[global_mapping::AdvertisingID] . '\',\'modal-add\')" class="btn btn-mini">Edit</a> ';
        if (!$item[global_mapping::IsDeleted]) {
            echo '<a href="javascript:advertising.delete(\'' . $item[global_mapping::AdvertisingID] . '\',1)" class="btn btn-mini">Delete</a> ';
        } else {
            echo '<a href="javascript:advertising.delete(\'' . $item[global_mapping::AdvertisingID] . '\',0)" class="btn btn-mini">Restore</a>';
        }
        echo '</td>';
        echo '</tr>';
    }
    echo '</table>';
    echo global_common::getPagingHTMLByNum($page, Model_Advertising::NUM_PER_PAGE, $total, 'core.util.changePage', 'admin_advert');
}
?>
				</div>
					</div>
		</div>
	</div>
</div>
<?php 
include_once 'include/_admin_footer.inc';
?>


<div id="modal-add" class="modal hide fade" tabindex="-1" data-width="800" data-keyboard="false"  aria-hidden="true" data-backdrop="static">
    <div class="modal-header">
        <!--button type="button" class="close" data-dismiss="modal" aria-hidden="true">
Пример #10
0
    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;
    }
Пример #11
0
    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;
    }
Пример #12
0
    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;
    }