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


PHP Library::update方法代码示例

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


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

示例1: copySearchSourcesFromLibrary

 function copySearchSourcesFromLibrary()
 {
     $libraryId = $_REQUEST['id'];
     if (isset($_REQUEST['submit'])) {
         $library = new Library();
         $library->libraryId = $libraryId;
         $library->find(true);
         $library->clearSearchSources();
         $libraryToCopyFromId = $_REQUEST['libraryToCopyFrom'];
         $libraryToCopyFrom = new Library();
         $libraryToCopyFrom->libraryId = $libraryToCopyFromId;
         $library->find(true);
         $searchSourcesToCopy = $libraryToCopyFrom->searchSources;
         foreach ($searchSourcesToCopy as $searchKey => $searchSources) {
             $searchSources->libraryId = $libraryId;
             $searchSources->id = null;
             $searchSourcesToCopy[$searchKey] = $searchSources;
         }
         $library->searchSources = $searchSourcesToCopy;
         $library->update();
         header("Location: /Admin/Libraries?objectAction=edit&id=" . $libraryId);
     } else {
         //Prompt user for the library to copy from
         $allLibraries = $this->getAllObjects();
         unset($allLibraries[$libraryId]);
         foreach ($allLibraries as $key => $library) {
             if (count($library->searchSources) == 0) {
                 unset($allLibraries[$key]);
             }
         }
         global $interface;
         $interface->assign('allLibraries', $allLibraries);
         $interface->assign('id', $libraryId);
         $interface->setTemplate('../Admin/copyLibrarySearchSources.tpl');
     }
 }
开发者ID:victorfcm,项目名称:VuFind-Plus,代码行数:36,代码来源:Libraries.php

示例2: array

        $iCompanyId = $_SESSION['sess_iCompanyId'];
        $iSGroupId = $_SESSION['sess_iSGroupId'];
        $qs = '';
    } else {
        $qs = '&iCompanyId=' . $iCompanyId . '&iSGroupId=' . $iSGroupId;
    }
}
if ($mode == "Add") {
    # echo "<pre>";  print_r($_FILES) ; exit;
    $redirect_file = "index.php?file=m-libraryadd&mode=" . $mode . "&iLibCategoryId=" . $iLibCategoryId . $qs;
    $GeneralObj->checkDuplicate('iLibCategoryId', 'LibraryCategory', array('vCategoryName', 'iSGroupId'), $redirect_file, "Category Already Exists ", $vCategoryName, ' and ');
    // $libraryObj->setdCreated($dCreated);
    $libraryObj->setiSGroupId($iSGroupId);
    $iLibCategoryId = $libraryObj->insert();
    $msg = MSG_ADD;
    $url = 'index.php?file=Library&AX=Yes' . $qs . '&var_msg=' . $msg;
    header("Location:" . $url);
    exit;
} else {
    if ($mode == "Update") {
        $update_sql = "UPDATE Document SET eStatus = '" . $eStatus . "'\n\t\t\tWHERE iLibCategoryId IN(" . $iLibCategoryId . ")";
        #echo $update_sql;exit;
        $obj->sql_query($update_sql);
        $libraryObj->setiSGroupId($iSGroupId);
        $libraryObj->update($iLibCategoryId);
        $msg = MSG_UPDATE;
        $url = 'index.php?file=Library&AX=Yes' . $qs . '&var_msg=' . $msg;
        header("Location:" . $url);
        exit;
    }
}
开发者ID:redeyes1024,项目名称:medlii_mlm_backend,代码行数:31,代码来源:libraryadd_a.php


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