當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Country::find_all方法代碼示例

本文整理匯總了PHP中Country::find_all方法的典型用法代碼示例。如果您正苦於以下問題:PHP Country::find_all方法的具體用法?PHP Country::find_all怎麽用?PHP Country::find_all使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Country的用法示例。


在下文中一共展示了Country::find_all方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: all

 function all()
 {
     $this->is_loggedin();
     $this->title = "Countries";
     $this->message = "BeBuntu Countries";
     $all_countries = new Country();
     pass_var('all_countries', $all_countries->find_all());
     pass_var('title', $this->title);
     pass_var('message', $this->message);
 }
開發者ID:stas,項目名稱:bebuntu,代碼行數:10,代碼來源:countries-controller.php

示例2: getData

 /**
  * load initail data for employee form needed during 
  * creating and editing employee
  * data 
  */
 public function getData()
 {
     global $database;
     $depts = Department::find_all();
     $role = Roles::find_all();
     $country = Country::find_all();
     $employee = Employee::find_all();
     $zone = Zone::find_by_sql("SELECT * FROM zone WHERE country_id=156");
     $startups = array("departs" => $depts, "country" => $country, "state" => $zone, "employee" => $employee, "role" => $role);
     return $startups;
 }
開發者ID:runningjack,項目名稱:RobertJohnson,代碼行數:16,代碼來源:general_model.php

示例3: getData

 /**
  * load initail data for employee form needed during 
  * creating and editing employee
  * data 
  */
 public function getData()
 {
     global $database;
     $depts = Department::find_all();
     $role = Roles::find_all();
     $country = Country::find_all();
     $vendors = Vendor::find_all();
     $zone = Zone::find_by_sql("SELECT * FROM zone");
     $startups = array("departs" => $depts, "country" => $country, "zone" => $zone, "vendors" => $vendors, "role" => $role);
     return $startups;
 }
開發者ID:runningjack,項目名稱:RobertJohnson,代碼行數:16,代碼來源:vendors_model.php

示例4: getData

 public function getData()
 {
     global $database;
     $depts = Department::find_all();
     $role = Roles::find_all();
     $country = Country::find_all();
     $vendors = Vendor::find_all();
     $countAcc = count(Cproduct::find_by_client($_SESSION["client_ident"]));
     $schedule = Cproduct::getNextSchedule($_SESSION["client_ident"]);
     $countTic = count(Ticket::find_by_client($_SESSION['client_ident']));
     $zone = Zone::find_by_sql("SELECT * FROM zone");
     $startups = array("departs" => $depts, "country" => $country, "zone" => $zone, "vendors" => $vendors, "role" => $role, "countProd" => $countAcc, "countTick" => $countTic, "Schel" => $schedule);
     return $startups;
 }
開發者ID:runningjack,項目名稱:RobertJohnson,代碼行數:14,代碼來源:account_model.php

示例5: getData

 public function getData()
 {
     global $database;
     $depts = Department::find_all();
     $role = Roles::find_all();
     $country = Country::find_all();
     $vendors = Vendor::find_all();
     $area = Area::find_all();
     $issues = Issue::find_all();
     $zone = Zone::find_by_sql("SELECT * FROM zone");
     $techEmp = Employee::find_by_sql("SELECT * FROM employee WHERE emp_dept='5'");
     $startups = array("departs" => $depts, "country" => $country, "zone" => $zone, "vendors" => $vendors, "role" => $role, "techemp" => $techEmp, "area" => $area, "issues" => $issues);
     return $startups;
 }
開發者ID:runningjack,項目名稱:RobertJohnson,代碼行數:14,代碼來源:clientproduct_model.php

示例6: add

 function add()
 {
     $this->is_loggedin();
     $this->title = "Add new teams";
     $this->message = "Add a new team";
     if ($_POST['action'] == 'newteam') {
         if ($this->newteam($_POST)) {
             $this->message = "Team added.";
         }
     }
     $all_countries = new Country();
     pass_var('countries', $all_countries->find_all());
     pass_var('title', $this->title);
     pass_var('message', $this->message);
 }
開發者ID:stas,項目名稱:bebuntu,代碼行數:15,代碼來源:teams-controller.php

示例7: getData

 public function getData()
 {
     global $database;
     $depts = Department::find_all();
     $role = Roles::find_all();
     $country = Country::find_all();
     $vendors = Vendor::find_all();
     $countAcc = count(Cproduct::find_by_client($_SESSION["client_ident"]));
     $schedule = Cproduct::getNextSchedule($_SESSION["client_ident"]);
     $OnSchedule = Schedule::find_by_sql("SELECT * FROM schedule WHERE client_id='" . $_SESSION['client_ident'] . "' AND maint_type !='Activation'  AND (status='Open' OR status='In Progress') ORDER BY id DESC LIMIT 10");
     $OnScheduleAct = Schedule::find_by_sql("SELECT * FROM schedule WHERE client_id='" . $_SESSION['client_ident'] . "' AND maint_type='Activation' AND  (status='Open' OR status='In Progress') ORDER BY id DESC LIMIT 10");
     $countTicketOpen = count(Ticket::find_by_sql("SELECT * FROM support_ticket WHERE client_id ='" . $_SESSION['client_ident'] . "' AND status ='Open'"));
     $countTicketClose = count(Ticket::find_by_sql("SELECT * FROM support_ticket WHERE client_id ='" . $_SESSION['client_ident'] . "' AND status ='Closed'"));
     $countTicketPending = count(Ticket::find_by_sql("SELECT * FROM support_ticket WHERE client_id ='" . $_SESSION['client_ident'] . "' AND (status ='Admin Reply' OR status='Customer Reply')"));
     $countTic = count(Ticket::find_by_client($_SESSION['client_ident']));
     $countuser = count(Clientuser::find_by_client($_SESSION['client_ident']));
     $zone = Zone::find_by_sql("SELECT * FROM zone");
     $startups = array("cschedule" => $OnSchedule, "departs" => $depts, "country" => $country, "zone" => $zone, "vendors" => $vendors, "role" => $role, "countProd" => $countAcc, "countTick" => $countTic, "Schel" => $schedule, "SchelAct" => $OnScheduleAct, "CountPending" => $countTicketPending, "CountOpent" => $countTicketOpen, "CountClosed" => $countTicketClose, "CountUsers" => $countuser);
     return $startups;
 }
開發者ID:runningjack,項目名稱:RobertJohnson,代碼行數:20,代碼來源:dashboard_model.php

示例8: getData

 /**
  * load initail data for support ticket form needed during 
  * creating and editing support ticket
  * data 
  */
 public function getData()
 {
     global $database;
     $depts = Department::find_all();
     $role = Roles::find_all();
     $country = Country::find_all();
     $vendors = Vendor::find_all();
     $myproducts = Cproduct::find_all();
     /**
      * issues may arise that when database
      * is cleared emp_dept may not be 5
      */
     $techEmployee = Employee::find_by_sql("SELECT * FROM employee WHERE emp_dept = 5");
     $zone = Zone::find_by_sql("SELECT * FROM zone");
     $startups = array("departs" => $depts, "country" => $country, "zone" => $zone, "vendors" => $vendors, "role" => $role, "myproducts" => $myproducts, "techstaff" => $techEmployee);
     return $startups;
 }
開發者ID:runningjack,項目名稱:RobertJohnson,代碼行數:22,代碼來源:support_model.php

示例9: getData

 /**
  * load initail data for support ticket form needed during 
  * creating and editing support ticket
  * data 
  */
 public function getData()
 {
     global $database;
     $depts = Department::find_all();
     $role = Roles::find_all();
     $country = Country::find_all();
     $vendors = Vendor::find_all();
     $myproducts = Cproduct::find_all();
     $lastSignoff = array_shift($database->fetch_assoc($database->db_query("SELECT MAX(id) as lastID, prod_id FROM sign_off_form ")));
     $lastWorkSheet = array_shift($database->fetch_assoc($database->db_query("SELECT MAX(id) as lastID, prod_id FROM work_sheet_form ")));
     /**
      * issues may arise that when database
      * is cleared emp_dept may not be 5
      */
     $clients = Client::find_all();
     // print_r($clients);
     $techEmployee = Employee::find_by_sql("SELECT * FROM employee WHERE emp_dept = 5");
     $zone = Zone::find_by_sql("SELECT * FROM zone");
     $startups = array("clients" => $clients, "departs" => $depts, "country" => $country, "zone" => $zone, "vendors" => $vendors, "role" => $role, "myproducts" => $myproducts, "techstaff" => $techEmployee, "lastsf" => $lastSignoff, "lastws" => $lastWorkSheet);
     return $startups;
 }
開發者ID:runningjack,項目名稱:RobertJohnson,代碼行數:26,代碼來源:support_model.php

示例10: getData

 /**
  * load initail data for employee form needed during 
  * creating and editing employee
  * data 
  */
 public function getData()
 {
     global $database;
     $depts = Department::find_all();
     $role = Roles::find_all();
     $country = Country::find_all();
     $vendors = Vendor::find_all();
     $products = Product::find_all();
     $myproducts = Cproduct::find_by_client($_SESSION['client_ident']);
     $zone = Zone::find_by_sql("SELECT * FROM zone");
     $issues = Issue::find_all();
     $startups = array("departs" => $depts, "country" => $country, "zone" => $zone, "vendors" => $vendors, "role" => $role, "myproducts" => $myproducts, "issues" => $issues, "products" => $products);
     return $startups;
 }
開發者ID:runningjack,項目名稱:RobertJohnson,代碼行數:19,代碼來源:supportticket_model.php

示例11: edit

 public function edit($nickname = null)
 {
     $user = $this->load_user($nickname);
     $this->assign("permalink", $user->permalink());
     if ($this->post) {
         $user->nickname = $this->PostData('nickname');
         $user->email = $this->PostData('email');
         $user->clan = $this->PostData('clan');
         $user->firstname = $this->PostData('firstname');
         $user->surname = $this->PostData('surname');
         $user->address1 = $this->PostData('address1');
         $user->address2 = $this->PostData('address2');
         $user->towncity = $this->PostData('towncity');
         $user->county = $this->PostData('county');
         $user->country_id = $this->PostData('country_id');
         $user->postcode = $this->PostData('postcode');
         $user->phone = $this->PostData('phone');
         $user->set_dateofbirth($this->PostData('dateofbirth'));
         $user->terms = $this->PostData('terms');
         $user->allow_emails = $this->PostData('allow_emails');
         $user->suspended = $this->PostData('suspended');
         $user->activated = $this->PostData('activated');
         if ($user->save()) {
             Site::flash("notice", "User has been updated");
             Redirect("admin/users/" . $user->permalink());
         }
     }
     $countries = Utils::FormOptions(Country::find_all("", "countries.name ASC"));
     $this->assign('countries', $countries);
     $this->assign("user", $user);
     $this->title = "Edit User";
     $this->render("user/edit.tpl");
 }
開發者ID:ItsHaden,項目名稱:epicLanBootstrap,代碼行數:33,代碼來源:user.controller.php

示例12: edit

 public function edit()
 {
     global $site;
     $user = Site::CurrentUser();
     $profile = $user->profile;
     if (isset($site['flash']['forceContactInfo']) && $site['flash']['forceContactInfo']) {
         Site::Flash('forceContactInfo', true);
         $user->requiresContactData = true;
     }
     $this->assign('requireContactData', $user->requiresContactData);
     if ($this->post and !$this->csrf) {
         $site['flash']['error'] = "Invalid form submission";
     } elseif ($this->post) {
         $user->clan = $this->PostData('clan');
         $user->address1 = $this->PostData('address1');
         $user->address2 = $this->PostData('address2');
         $user->towncity = $this->PostData('towncity');
         $user->county = $this->PostData('county');
         $user->country_id = $this->PostData('country_id');
         $user->postcode = $this->PostData('postcode');
         $user->phone = $this->PostData('phone');
         $user->allow_emails = $this->PostData('allow_emails');
         $profile->website = $this->PostData('website');
         $profile->windows_live = $this->PostData('windows_live');
         $profile->facebook = $this->PostData('facebook');
         $profile->twitter = $this->PostData('twitter');
         $profile->xfire = $this->PostData('xfire');
         $profile->xbox_live = $this->PostData('xbox_live');
         $profile->ps_network = $this->PostData('ps_network');
         $profile->occupation = $this->PostData('occupation');
         $profile->nationality = $this->PostData('nationality');
         $profile->gender = $this->PostData('gender');
         $profile->gaming_style = $this->PostData('gaming_style');
         $profile->hobbies_and_interests = $this->PostData('hobbies_and_interests');
         $profile->rig_manufacturer = $this->PostData('rig_manufacturer');
         $profile->rig_processor = $this->PostData('rig_processor');
         $profile->rig_memory = $this->PostData('rig_memory');
         $profile->rig_hdd = $this->PostData('rig_hdd');
         $profile->rig_gfx = $this->PostData('rig_gfx');
         $profile->rig_monitor = $this->PostData('rig_monitor');
         $profile->rig_sound_card = $this->PostData('rig_sound_card');
         $profile->rig_speaker_headphone = $this->PostData('rig_speaker_headphone');
         $profile->rig_keyboard = $this->PostData('rig_keyboard');
         $profile->rig_mouse = $this->PostData('rig_mouse');
         $profile->rig_mouse_surface = $this->PostData('rig_mouse_surface');
         $profile->rig_os = $this->PostData('rig_os');
         $profile->rig_mobo = $this->PostData('rig_mobo');
         $profile->rig_case = $this->PostData('rig_case');
         if ($user->save() && $profile->save()) {
             Site::flash("notice", "Your account has been updated");
             Redirect("account");
         }
     }
     $countries = Utils::FormOptions(Country::find_all("", "countries.name ASC"));
     $this->assign('countries', $countries);
     $this->assign("user", $user);
     $this->assign("profile", $profile);
     $this->assign("site", $site);
     $this->title = "My Account";
     $this->render("user/edit.tpl");
 }
開發者ID:ItsHaden,項目名稱:epicLanBootstrap,代碼行數:61,代碼來源:user.controller.php


注:本文中的Country::find_all方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。