本文整理汇总了PHP中set_user_collection函数的典型用法代码示例。如果您正苦于以下问题:PHP set_user_collection函数的具体用法?PHP set_user_collection怎么用?PHP set_user_collection使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了set_user_collection函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get_user_collections
}
}
# Get count of collections
$c = get_user_collections($userref);
# If the user has just deleted the collection they were using, select a new collection
if ($deleted_usercoll && count($c) > 0) {
# Select the first collection in the dropdown box.
$usercollection = $c[0]["ref"];
set_user_collection($userref, $usercollection);
}
# User has deleted their last collection? add a new one.
if (count($c) == 0) {
# No collections to select. Create them a new collection.
$name = get_mycollection_name($userref);
$usercollection = create_collection($userref, $name);
set_user_collection($userref, $usercollection);
}
refresh_collection_frame($usercollection);
}
hook('customcollectionmanage');
$removeall = getvalescaped("removeall", "");
if ($removeall != "") {
remove_all_resources_from_collection($removeall);
refresh_collection_frame($usercollection);
}
include "../include/header.php";
?>
<div class="BasicsBox">
<h2> </h2>
<h1><?php
echo $lang["managemycollections"];
开发者ID:chandradrupal,项目名称:resourcespace,代码行数:31,代码来源:collection_manage.php
示例2: get_user_collections
?>
</option><?php
}
?>
<?php
if ($upload_force_mycollection) {
$list = get_user_collections($userref, "My Collection");
} else {
$list = get_user_collections($userref);
}
$currentfound = false;
// make sure it's possible to set the collection with collection_add (compact style "upload to this collection"
if ($collection_add != "" && getval("resetform", "") == "" && (!isset($save_errors) || !$save_errors)) {
# Switch to the selected collection (existing or newly created) and refresh the frame.
set_user_collection($userref, $collection_add);
refresh_collection_frame($collection_add);
}
for ($n = 0; $n < count($list); $n++) {
if ($collection_dropdown_user_access_mode) {
$colusername = $list[$n]['fullname'];
# Work out the correct access mode to display
if (!hook('collectionaccessmode')) {
if ($list[$n]["public"] == 0) {
$accessmode = $lang["private"];
} else {
if (strlen($list[$n]["theme"]) > 0) {
$accessmode = $lang["theme"];
} else {
$accessmode = $lang["public"];
}
开发者ID:chandradrupal,项目名称:resourcespace,代码行数:31,代码来源:edit_upload_options.php
示例3: basket
include "../include/general.php";
include "../include/resource_functions.php";
include "../include/search_functions.php";
include "../include/collections_functions.php";
if (getval("purchaseonaccount","")!="" && $userrequestmode==3)
{
# Invoice mode.
# Mark as payment complete.
payment_set_complete($usercollection);
# Set new user collection to empty the basket (without destroying the old basket which contains the 'paid' flag to enable the download).
$oldcollection=$usercollection;
$name=get_mycollection_name($userref);
$newcollection=create_collection ($userref,$name,0,1); // make not deletable
set_user_collection($userref,$newcollection);
# Redirect to basket (old) collection for download.
redirect($baseurl_short."pages/purchase_download.php?collection=" . $oldcollection);
}
include "../include/header.php";
if (getval("submit","")=="")
{
# ------------------- Show the size selection screen -----------------------
?>
<div class="BasicsBox">
<h2> </h2>
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:31,代码来源:purchase.php
示例4: add_smart_collection
function add_smart_collection()
{
global $userref;
$search = getvalescaped("addsmartcollection", "");
$restypes = getvalescaped("restypes", "");
if ($restypes == "Global") {
$restypes = "";
}
$archive = getvalescaped("archive", "", true);
$starsearch = getvalescaped("starsearch", 0);
// more compact search strings should work with get_search_title
$searchstring = array();
if ($search != "") {
$searchstring[] = "search={$search}";
}
if ($restypes != "") {
$searchstring[] = "restypes={$restypes}";
}
if ($starsearch != "") {
$searchstring[] = "starsearch={$starsearch}";
}
if ($archive != 0) {
$searchstring[] = "archive={$archive}";
}
$searchstring = implode("&", $searchstring);
if ($starsearch == "") {
$starsearch = 0;
}
$newcollection = create_collection($userref, get_search_title($searchstring), 1);
sql_query("insert into collection_savedsearch(collection,search,restypes,archive,starsearch) values ('{$newcollection}','" . $search . "','" . $restypes . "','" . $archive . "','" . $starsearch . "')");
$savedsearch = sql_insert_id();
sql_query("update collection set savedsearch='{$savedsearch}' where ref='{$newcollection}'");
set_user_collection($userref, $newcollection);
}
开发者ID:perryrothjohnson,项目名称:resourcespace,代码行数:34,代码来源:collections_functions.php
示例5:
$research=getvalescaped("research","");
if ($research!="")
{
hook("preresearch");
$col=get_research_request_collection($research);
if ($col==false)
{
$rr=get_research_request($research);
$name="Research: " . $rr["name"]; # Do not translate this string, the collection name is translated when displayed!
$new=create_collection ($rr["user"],$name,1);
set_user_collection($userref,$new);
set_research_collection($research,$new);
}
else
{
set_user_collection($userref,$col);
}
hook("postresearch");
}
hook("processusercommand");
?>
<?php
$searches=get_saved_searches($usercollection);
// Note that the full search is done initially. The time saved is due to content drawing and transfer.
$result=do_search("!collection" . $usercollection,"","relevance",0);
$count_result=count($result);
开发者ID:artsmia,项目名称:mia_resourcespace,代码行数:30,代码来源:collections.php
注:本文中的set_user_collection函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论