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


PHP Photo::makeMain方法代碼示例

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


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

示例1: get


//.........這裏部分代碼省略.........
                 $this->property->contact_id = $_GET['cid'];
             }
             $this->editProperty();
             break;
         case 'email_contacts':
             $this->emailContacts();
             break;
         case 'activate_contact':
             if (!\Current_User::authorized('properties')) {
                 \Current_User::disallow();
             }
             $this->loadContact();
             $this->contact->setActive(true);
             $this->contact->save();
             \PHPWS_Core::goBack();
             break;
         case 'show_blocked':
             $_SESSION['prop_show_blocked'] = 1;
             $this->viewReported();
             break;
         case 'hide_blocked':
             unset($_SESSION['prop_show_blocked']);
             $this->viewReported();
             break;
         case 'deactivate_contact':
             if (!\Current_User::authorized('properties')) {
                 \Current_User::disallow();
             }
             $this->loadContact();
             $this->contact->setActive(false);
             $this->contact->save();
             \PHPWS_Core::goBack();
             break;
         case 'activate_property':
             if (!\Current_User::authorized('properties')) {
                 \Current_User::disallow();
             }
             $this->loadProperty();
             $this->property->setActive(true);
             $this->property->save();
             \PHPWS_Core::goBack();
             break;
         case 'reported':
             $this->viewReported();
             break;
         case 'deactivate_property':
             if (!\Current_User::authorized('properties')) {
                 \Current_User::disallow();
             }
             $this->loadProperty();
             $this->property->setActive(false);
             $this->property->save();
             \PHPWS_Core::goBack();
             break;
         case 'delete_photo':
             // called via ajax
             if (!\Current_User::authorized('properties')) {
                 \Current_User::disallow();
             }
             ob_start();
             $photo = new Photo($_GET['id']);
             $photo->delete();
             echo Photo::getThumbs($photo->pid);
             exit;
             break;
         case 'make_main':
             $photo = new Photo($_GET['id']);
             $photo->makeMain();
             exit;
             break;
         case 'delete_property':
             if (!\Current_User::authorized('properties')) {
                 \Current_User::disallow();
             }
             $this->loadProperty();
             $this->property->delete();
             \PHPWS_Core::goBack();
             break;
         case 'settings':
             $this->settingsForm();
             break;
         case 'report_view':
             $this->reportView($_GET['id']);
             break;
         case 'block_report':
             $this->blockReport($_GET['id']);
             break;
         case 'ignore_report':
             $this->ignoreReport($_GET['id']);
             \PHPWS_Core::goBack();
             break;
         case 'properties':
         default:
             $this->panel->setCurrentTab('properties');
             $this->title = "Properties list";
             $this->propertiesList();
             break;
     }
     $this->display();
 }
開發者ID:par-orillonsoft,項目名稱:phpwebsite,代碼行數:101,代碼來源:Admin.php

示例2: get

 public function get()
 {
     $this->loadContact();
     switch ($_GET['cop']) {
         case 'logout':
             unset($_SESSION['Contact_User']);
             \PHPWS_Core::home();
             break;
         case 'edit_property':
             $this->checkPermission();
             $this->loadProperty($this->contact->id);
             $this->editProperty($this->contact->id);
             break;
         case 'view_properties':
             $this->checkPermission();
             $this->title = "Properties list";
             $this->propertiesList($this->contact->id);
             break;
         case 'photo_form':
             $photo = new Photo();
             echo $photo->form();
             exit;
             break;
         case 'activate_property':
             $this->checkPermission();
             $this->loadProperty();
             $this->property->setActive(true);
             $this->property->save();
             \PHPWS_Core::goBack();
             break;
         case 'deactivate_property':
             $this->checkPermission();
             $this->loadProperty();
             $this->property->setActive(false);
             $this->property->save();
             \PHPWS_Core::goBack();
             break;
         case 'edit_contact':
             $this->checkPermission();
             $this->editContact();
             break;
         case 'delete_photo':
             // called via ajax
             $this->checkPermission();
             ob_start();
             $photo = new Photo($_GET['id']);
             $photo->delete();
             echo Photo::getThumbs($photo->pid);
             exit;
             break;
         case 'delete_property':
             $this->checkPermission();
             $this->loadProperty();
             // double security
             if ($this->property->contact_id == $this->contact->id) {
                 $this->property->delete();
             }
             \PHPWS_Core::goBack();
             break;
         case 'make_main':
             $photo = new Photo($_GET['id']);
             $photo->makeMain();
             exit;
             break;
         case 'update':
             $this->checkPermission();
             $this->loadProperty();
             $this->property->update();
             \PHPWS_Core::goBack();
             break;
     }
     $this->display();
 }
開發者ID:par-orillonsoft,項目名稱:phpwebsite,代碼行數:73,代碼來源:Contact_User.php

示例3: get

 public function get()
 {
     $this->loadContact();
     switch ($_GET['cop']) {
         case 'logout':
             unset($_SESSION['Contact_User']);
             \PHPWS_Core::home();
             break;
         case 'manager_sign_up':
             if (!self::allowNewUserSignup()) {
                 $this->title = 'Sorry';
                 $this->content = '<p>New manager sign ups are not permitted at this time.</p>';
             } else {
                 $this->newManagerSetup();
             }
             break;
         case 'edit_property':
             $this->checkPermission();
             $this->loadProperty($this->contact->id);
             $this->editProperty($this->contact->id);
             break;
         case 'view_properties':
             $this->checkPermission();
             $this->title = "Properties list";
             $this->propertiesList($this->contact->id);
             break;
         case 'photo_form':
             $photo = new Photo();
             echo $photo->form();
             exit;
             break;
         case 'activate_property':
             $this->checkPermission();
             $this->loadProperty();
             $this->property->setActive(true);
             $this->property->save();
             \PHPWS_Core::goBack();
             break;
         case 'deactivate_property':
             $this->checkPermission();
             $this->loadProperty();
             $this->property->setActive(false);
             $this->property->save();
             \PHPWS_Core::goBack();
             break;
         case 'edit_contact':
             $this->checkPermission();
             $this->editContact();
             break;
         case 'delete_photo':
             // called via ajax
             $this->checkPermission();
             ob_start();
             $photo = new Photo($_GET['id']);
             $photo->delete();
             echo Photo::getThumbs($photo->pid);
             exit;
             break;
         case 'delete_property':
             $this->checkPermission();
             $this->loadProperty();
             // double security
             if ($this->property->contact_id == $this->contact->id) {
                 $this->property->delete();
             }
             \PHPWS_Core::goBack();
             break;
         case 'make_main':
             $photo = new Photo($_GET['id']);
             $photo->makeMain();
             exit;
             break;
         case 'update':
             $this->checkPermission();
             $this->loadProperty();
             $this->property->update();
             \PHPWS_Core::goBack();
             break;
         case 'checkUsername':
             $this->checkUsername();
             exit;
         case 'checkEmail':
             $this->checkEmail();
             exit;
     }
     $this->display();
 }
開發者ID:HaldunA,項目名稱:phpwebsite,代碼行數:87,代碼來源:Contact_User.php


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