本文整理汇总了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;
}