示例#1
0
/**
 * get the components xml data
 * returns an array of xmlobjs
 *
 * @since 3.4
 * 
 * @global snippets
 * @param  boolean $refresh refresh from file
 * @return components data items xmlobj
 *
 */
function get_snippets_xml($refresh = false)
{
    global $snippets;
    if (!$snippets || $refresh) {
        $snippets = get_collection_items(GSSNIPPETSFILE);
    }
    return $snippets;
}
示例#2
0
                 } else {
                     if ($amount <= 0) {
                         $message = delete_collection_item($collection_item_id);
                     } else {
                         //echo $amount;
                         $message = update_collection_item($collection_item_id, $amount);
                     }
                 }
             }
             if ($message == 'success') {
                 $message = 'Collection Updated';
             } elseif ($message == 'error') {
                 $message = 'Something went Wrong';
             }
             $likes = get_likes($collection_id);
             $collection_items = get_collection_items($collection_id);
             include 'collectionView.php';
         }
     } else {
         $message = 'Please sign in to manage collections';
         include 'home.php';
     }
     break;
 case 'changecollection':
     $collection_id = filter_input(INPUT_GET, 'collectionid', FILTER_VALIDATE_INT);
     $collection = change_collection($collection_id);
     echo '<div id="namevalue">' . $collection['collection_name'] . '</div>
           <div id="descvalue">' . $collection['collection_description'] . '</div>
           <div id="publicvalue">' . $collection['is_public'] . '</div>
           <div id="priorityvalue">' . $collection['priority'] . '</div>';
     //echo $collection['collection_name'];