本文整理匯總了PHP中Application_Model_User::listRooms方法的典型用法代碼示例。如果您正苦於以下問題:PHP Application_Model_User::listRooms方法的具體用法?PHP Application_Model_User::listRooms怎麽用?PHP Application_Model_User::listRooms使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Application_Model_User
的用法示例。
在下文中一共展示了Application_Model_User::listRooms方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: adduserorderAction
public function adduserorderAction()
{
$product_model = new Application_Model_Product();
$user_model = new Application_Model_User();
$order = new Application_Model_Order();
$order_details_model = new Application_Model_OrderDetails();
//$this->view->products = $product_model->listProducts();
$allproducts = $product_model->availableProducts('"1"');
$allRooms = $user_model->listRooms();
//get last order id ,, max
$userid = $this->user_id;
$user_order = $order->getUserOrders($userid);
if (count($user_order)) {
//3shan mmkn tkon lsa new user has no orders&order detailss
$max = $user_order[0]['id'];
for ($i = 0; $i < count($user_order); $i++) {
if ($user_order[$i]['id'] > $max) {
$max = $user_order[$i]['id'];
}
}
// get order details fr table 2 .. prod ids
$order_details = $order_details_model->getOrderDetails($max);
///var_dump($order_details);
$productsid = array();
for ($i = 0; $i < count($order_details); $i++) {
array_push($productsid, $order_details[$i]['product_id']);
}
// get prods info
$productdetails = array();
for ($i = 0; $i < count($productsid); $i++) {
array_push($productdetails, $product_model->getProductById($productsid[$i]));
}
$this->view->latestorder = $productdetails;
}
//mskt araay fiha info kl prod fe a5r order
$this->view->products = $allproducts;
$this->view->rooms = $allRooms;
$this->view->myname = $this->user_name;
$this->view->myimg = $this->user_image;
}