当前位置: 首页>>代码示例>>PHP>>正文


PHP Sites::update方法代码示例

本文整理汇总了PHP中Sites::update方法的典型用法代码示例。如果您正苦于以下问题:PHP Sites::update方法的具体用法?PHP Sites::update怎么用?PHP Sites::update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Sites的用法示例。


在下文中一共展示了Sites::update方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: editAction

 public function editAction(Sites $site)
 {
     if ($this->request->isPost()) {
         $data = $this->request->getPost();
         //            dd($data);
         $site->update($data);
         $this->redirectByRoute(['for' => 'sites.show', 'site' => $site->id]);
     }
     $this->view->site = $site;
     $this->view->form = myForm::buildFormFromModel($site);
 }
开发者ID:huoybb,项目名称:movie,代码行数:11,代码来源:SitesController.php

示例2: AdminPage

<?php

require_once "config.php";
require_once WWW_DIR . "/lib/adminpage.php";
require_once WWW_DIR . "/lib/site.php";
$page = new AdminPage();
$sites = new Sites();
$id = 0;
// set the current action
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view';
switch ($action) {
    case 'submit':
        $site = $sites->update($_POST);
        $returnid = $site->id;
        header("Location:" . WWW_TOP . "/site-edit.php?id=" . $returnid);
        break;
    case 'view':
    default:
        $page->title = "Site Edit";
        $site = $sites->get();
        $page->smarty->assign('fsite', $site);
        break;
}
$page->smarty->assign('yesno_ids', array(1, 0));
$page->smarty->assign('yesno_names', array('Yes', 'No'));
$page->smarty->assign('menupos_ids', array(1, 2));
$page->smarty->assign('menupos_names', array('Left', 'Top'));
$page->smarty->assign('newgroupscan_names', array('Days', 'Posts'));
$page->smarty->assign('registerstatus_ids', array(Sites::REGISTER_STATUS_OPEN, Sites::REGISTER_STATUS_INVITE, Sites::REGISTER_STATUS_CLOSED));
$page->smarty->assign('registerstatus_names', array('Open', 'Invite', 'Closed'));
$page->smarty->assign('passworded_ids', array(0, 1, 2));
开发者ID:nubzzz,项目名称:newznab,代码行数:31,代码来源:site-edit.php

示例3: AdminPage

<?php

require_once "config.php";
require_once WWW_DIR . "/lib/adminpage.php";
require_once WWW_DIR . "/lib/site.php";
require_once WWW_DIR . "/lib/sabnzbd.php";
$page = new AdminPage();
$sites = new Sites();
$id = 0;
// set the current action
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view';
switch ($action) {
    case 'submit':
        $error = "";
        $ret = $sites->update($_POST);
        if (is_int($ret)) {
            if ($ret == Sites::ERR_BADUNRARPATH) {
                $error = "The unrar path does not point to a valid binary";
            } elseif ($ret == Sites::ERR_BADFFMPEGPATH) {
                $error = "The ffmpeg path does not point to a valid binary";
            } elseif ($ret == Sites::ERR_BADMEDIAINFOPATH) {
                $error = "The mediainfo path does not point to a valid binary";
            } elseif ($ret == Sites::ERR_BADNZBPATH) {
                $error = "The nzb path does not point to a valid directory";
            } elseif ($ret == Sites::ERR_DEEPNOUNRAR) {
                $error = "Deep password check requires a valid path to unrar binary";
            } elseif ($ret == Sites::ERR_BADTMPUNRARPATH) {
                $error = "The temp unrar path is not a valid directory";
            } elseif ($ret == Sites::ERR_BADLAMEPATH) {
                $error = "The lame path is not a valid directory";
            } elseif ($ret == Sites::ERR_SABCOMPLETEPATH) {
开发者ID:scriptzteam,项目名称:newzNZB-premium-indexer,代码行数:31,代码来源:site-edit.php


注:本文中的Sites::update方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。