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


PHP refresh_collection_frame函数代码示例

本文整理汇总了PHP中refresh_collection_frame函数的典型用法代码示例。如果您正苦于以下问题:PHP refresh_collection_frame函数的具体用法?PHP refresh_collection_frame怎么用?PHP refresh_collection_frame使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: exit

}
# Check access
if (!$cinfo["request_feedback"]) {
    exit("Access denied.");
}
# Check that comments have been added.
$comments = get_collection_comments($collection);
if (count($comments) == 0 && $feedback_resource_select == false) {
    $errors = $lang["feedbacknocomments"];
}
if (getval("save", "") != "") {
    # Save comment
    $comment = trim(getvalescaped("comment", ""));
    send_collection_feedback($collection, $comment);
    # Stay on this page for external access users (no access to search)
    refresh_collection_frame();
    $done = true;
}
$headerinsert .= "<script src=\"../lib/lightbox/js/jquery.lightbox-0.5.min.js\" type=\"text/javascript\"></script>";
$headerinsert .= "<link type=\"text/css\" href=\"../lib/lightbox/css/jquery.lightbox-0.5.css?css_reload_key=" . $css_reload_key . "\" rel=\"stylesheet\">";
include "../include/header.php";
?>
<script type="text/javascript">
	jQuery(document).ready(function(){
		jQuery('.lightbox').lightBox(); 
	
	});

</script>
<div class="BasicsBox">
<h1><?php 
开发者ID:vongalpha,项目名称:resourcespace,代码行数:31,代码来源:collection_feedback.php

示例2: set_user_collection

        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>&nbsp;</h2>
    <h1><?php 
echo $lang["managemycollections"];
?>
</h1>
    <p class="tight"><?php 
echo text("introtext");
?>
</p><br>
<div class="BasicsBox">
    <form method="post" action="<?php 
开发者ID:chandradrupal,项目名称:resourcespace,代码行数:31,代码来源:collection_manage.php

示例3: save_collection


//.........这里部分代码省略.........
        $sql = "update collection set\n\t\t\t\tname='" . urldecode(getvalescaped("name", "")) . "',\n\t\t\t\t" . hook('savecollectionadditionalfields') . "\n\t\t\t\tkeywords='" . getvalescaped("keywords", "") . "',\n\t\t\t\tpublic='" . getvalescaped("public", "", true) . "',";
        for ($n = 1; $n <= $theme_category_levels; $n++) {
            if ($n == 1) {
                $themeindex = "";
            } else {
                $themeindex = $n;
            }
            $themes[$n] = getvalescaped("theme{$themeindex}", "");
            if (getval("newtheme{$themeindex}", "") != "") {
                $themes[$n] = trim(getvalescaped("newtheme{$themeindex}", ""));
            }
            if (isset($themes[$n])) {
                $sql .= "theme" . $themeindex . "='" . $themes[$n] . "',";
            }
        }
        $sql .= "allow_changes='" . $allow_changes . "'";
        if (checkperm("h")) {
            $sql .= "\n\t\t\t,home_page_publish='" . (getvalescaped("home_page_publish", "") != "" ? "1" : "0") . "'\n\t\t\t,home_page_text='" . getvalescaped("home_page_text", "") . "'";
            if (getval("home_page_image", "") != "") {
                $sql .= ",home_page_image='" . getvalescaped("home_page_image", "") . "'";
            }
        }
        $modified_sql = hook('morehomepagepublishsave', "", array($sql));
        if (!empty($modified_sql)) {
            $sql = $modified_sql;
        }
        $sql .= " where ref='{$ref}'";
        sql_query($sql);
    }
    # end replace hook - modifysavecollection
    index_collection($ref);
    # If 'users' is specified (i.e. access is private) then rebuild users list
    $users = getvalescaped("users", false);
    if ($users !== false) {
        sql_query("delete from user_collection where collection='{$ref}'");
        if ($attach_user_smart_groups) {
            sql_query("delete from usergroup_collection where collection='{$ref}'");
        }
        #log this
        collection_log($ref, "T", 0, '#all_users');
        if ($users != "") {
            # Build a new list and insert
            $users = resolve_userlist_groups($users);
            $ulist = array_unique(trim_array(explode(",", $users)));
            $urefs = sql_array("select ref value from user where username in ('" . join("','", $ulist) . "')");
            if (count($urefs) > 0) {
                sql_query("insert into user_collection(collection,user) values ({$ref}," . join("),(" . $ref . ",", $urefs) . ")");
            }
            #log this
            collection_log($ref, "S", 0, join(", ", $ulist));
            if ($attach_user_smart_groups) {
                $groups = resolve_userlist_groups_smart($users);
                $groupnames = '';
                if ($groups != '') {
                    $groups = explode(",", $groups);
                    if (count($groups) > 0) {
                        foreach ($groups as $group) {
                            sql_query("insert into usergroup_collection(collection,usergroup) values ({$ref},{$group})");
                            // get the group name
                            if ($groupnames != '') {
                                $groupnames .= ", ";
                            }
                            $groupnames .= sql_value("select name value from usergroup where ref={$group}", "");
                        }
                    }
                    #log this
                    collection_log($ref, "S", 0, $groupnames);
                }
            }
        }
    }
    # Relate all resources?
    if (getval("relateall", "") != "") {
        $rlist = get_collection_resources($ref);
        for ($n = 0; $n < count($rlist); $n++) {
            for ($m = 0; $m < count($rlist); $m++) {
                if ($rlist[$n] != $rlist[$m]) {
                    if (count(sql_query("SELECT 1 FROM resource_related WHERE resource='" . $rlist[$n] . "' and related='" . $rlist[$m] . "' LIMIT 1")) != 1) {
                        sql_query("insert into resource_related (resource,related) values ('" . $rlist[$n] . "','" . $rlist[$m] . "')");
                    }
                }
            }
        }
    }
    # Remove all resources?
    if (getval("removeall", "") != "") {
        remove_all_resources_from_collection($ref);
    }
    # Delete all resources?
    if (getval("deleteall", "") != "" && !checkperm("D")) {
        if (allow_multi_edit($ref)) {
            delete_resources_in_collection($ref);
        }
    }
    # Update limit count for saved search
    if (isset($_POST["result_limit"])) {
        sql_query("update collection_savedsearch set result_limit='" . getvalescaped("result_limit", "") . "' where collection='{$ref}'");
    }
    refresh_collection_frame();
}
开发者ID:perryrothjohnson,项目名称:resourcespace,代码行数:101,代码来源:collections_functions.php

示例4: 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

示例5: save_collection


//.........这里部分代码省略.........
			if ($n==1){$themeindex="";} else {$themeindex=$n;}
			$themes[$n]=getvalescaped("theme$themeindex","");
			if (getval("newtheme$themeindex","")!="") {
				$themes[$n]=trim(getvalescaped("newtheme$themeindex",""));
				}
			if (isset($themes[$n])){
				$sql.="theme".$themeindex."='" . $themes[$n]. "',";
				}
		}

	$sql.="allow_changes='" . $allow_changes . "'";
	
	if (checkperm("h"))
		{	
		$sql.="
			,home_page_publish='" . (getvalescaped("home_page_publish","")!=""?"1":"0") . "'
			,home_page_text='" . getvalescaped("home_page_text","") . "'";
		if (getval("home_page_image","")!="")
			{
			$sql.=",home_page_image='" . getvalescaped("home_page_image","") . "'";
			}
		}
		
	    $sql.=" where ref='$ref'";
	
	sql_query($sql);
	} # end replace hook - modifysavecollection
	
	index_collection($ref);
		
	# If 'users' is specified (i.e. access is private) then rebuild users list
	$users=getvalescaped("users",false);
	if ($users!==false)
		{
		sql_query("delete from user_collection where collection='$ref'");
		#log this
		collection_log($ref,"T",0, '#all_users');

		if (($users)!="")
			{
			# Build a new list and insert
			$users=resolve_userlist_groups($users);
			$ulist=array_unique(trim_array(explode(",",$users)));
			$urefs=sql_array("select ref value from user where username in ('" . join("','",$ulist) . "')");
			if (count($urefs)>0)
				{
				sql_query("insert into user_collection(collection,user) values ($ref," . join("),(" . $ref . ",",$urefs) . ")");
				}
			#log this
			collection_log($ref,"S",0, join(", ",$ulist));
			}
		}
		
	# Relate all resources?
	if (getval("relateall","")!="")
		{
		$rlist=get_collection_resources($ref);
		for ($n=0;$n<count($rlist);$n++)
			{
			for ($m=0;$m<count($rlist);$m++)
				{
				if ($rlist[$n]!=$rlist[$m]) # Don't relate a resource to itself
					{
					sql_query("delete from resource_related where resource='" . $rlist[$n] . "' and related='" . $rlist[$m] . "'");
					sql_query("insert into resource_related (resource,related) values ('" . $rlist[$n] . "','" . $rlist[$m] . "')");
					}
				}
			}
		}
	
	
	# Remove all resources?
	if (getval("removeall","")!="")
		{
		remove_all_resources_from_collection($ref);
		}
		
	# Delete all resources?
	if (getval("deleteall","")!="" && !checkperm("D"))
		{
		$resources=do_search("!collection" . $ref);
		for ($n=0;$n<count($resources);$n++)
			{
			if (checkperm("e" . $resources[$n]["archive"]))
				{
				delete_resource($resources[$n]["ref"]);	
				collection_log($ref,"D",$resources[$n]["ref"]);
				}
			}
		}
		
	# Update limit count for saved search
	if (isset($_POST["result_limit"]))
		{
		sql_query("update collection_savedsearch set result_limit='" . getvalescaped("result_limit","") . "' where collection='$ref'");
		
		}
	
	refresh_collection_frame();
	}
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:101,代码来源:collections_functions.php


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