* * workspace templates template page, used displays the User created * * @author Patrick Lockley * @version 1.0 * @copyright Copyright (c) 2008,2009 University of Nottingham * @package */ require_once "../../../config.php"; _load_language_file("/website_code/php/workspaceproperties/usage_templates_template.inc"); include "../display_library.php"; include "workspace_library.php"; /** * connect to the database */ workspace_templates_menu(); $database_connect_id = database_connect("Folder_content_template.php connect success", "Folder_content_template.php connect failed"); $query_for_shared_templates = "select * from " . $xerte_toolkits_site->database_table_prefix . "templatedetails, " . $xerte_toolkits_site->database_table_prefix . "templaterights where user_id=\"" . $_SESSION['toolkits_logon_id'] . "\" and " . $xerte_toolkits_site->database_table_prefix . "templatedetails.template_id = " . $xerte_toolkits_site->database_table_prefix . "templaterights.template_id"; $query_shared_response = mysql_query($query_for_shared_templates); workspace_menu_create(60); echo "<div style=\"float:left; width:40%; height:20px;\">" . USAGE_TEMPLATE_STATS . "</div>"; while ($row_template_name = mysql_fetch_array($query_shared_response)) { if (trim($row_template_name['number_of_uses']) != "") { $plays = $row_template_name['number_of_uses']; } else { $plays = 0; } echo "<div style=\"float:left; width:60%;\">" . str_replace("_", "", $row_template_name['template_name']) . "</div>"; echo "<div style=\"float:left; width:40%;\">" . $plays . "</div>"; } echo "</div></div>";
* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * * public templates template page, used displays the User created * * @author Patrick Lockley * @version 1.0 * @package */ require_once "../../../config.php"; include "../display_library.php"; include "workspace_library.php"; /** * connect to the database */ workspace_templates_menu(); $prefix = $xerte_toolkits_site->database_table_prefix; $database_connect_id = database_connect("Folder_content_template.php connect success", "Folder_content_template.php connect failed"); $query_for_public_templates = "select * from {$prefix}templatedetails, {$prefix}templaterights where " . "access_to_whom = ? AND " . "user_id = ? and " . " {$prefix}templaterights.template_id = {$prefix}templatedetails.template_id ORDER BY template_name DESC"; $params = array('public', $_SESSION['toolkits_logon_id']); $query_public_response = db_query($query_for_public_templates, $params); workspace_menu_create(100); foreach ($query_public_response as $row_template_name) { echo "<div style=\"float:left; width:100%;\">" . str_replace("_", "", $row_template_name['template_name']) . "</div>"; } echo "</div>";
* * workspace templates template page, used displays the User created * * @author Patrick Lockley * @version 1.0 * @copyright Copyright (c) 2008,2009 University of Nottingham * @package */ require_once "../../../config.php"; _load_language_file("/website_code/php/workspaceproperties/syndication_templates_template.inc"); include "../display_library.php"; include "workspace_library.php"; /** * connect to the database */ workspace_templates_menu(); $database_connect_id = database_connect("Folder_content_template.php connect success", "Folder_content_template.php connect failed"); $query_for_rss_templates = "select * from " . $xerte_toolkits_site->database_table_prefix . "templatedetails, " . $xerte_toolkits_site->database_table_prefix . "templaterights, " . $xerte_toolkits_site->database_table_prefix . "templatesyndication where creator_id=\"" . $_SESSION['toolkits_logon_id'] . "\" and " . $xerte_toolkits_site->database_table_prefix . "templatedetails.template_id = " . $xerte_toolkits_site->database_table_prefix . "templaterights.template_id and " . $xerte_toolkits_site->database_table_prefix . "templaterights.template_id = " . $xerte_toolkits_site->database_table_prefix . "templatesyndication.template_id and role=\"creator\" and (rss=\"true\" or export=\"true\")"; $query_rss_response = mysql_query($query_for_rss_templates); workspace_menu_create(50); echo "<div style=\"float:left; width:40%; height:20px;\">" . SYNDICATION_TEMPLATE_TERM . "</div>"; while ($row_template_name = mysql_fetch_array($query_rss_response)) { echo "<div style=\"float:left; width:50%;\">" . str_replace("_", "", $row_template_name['template_name']) . "</div><div style=\"float:left; width:40%;\">"; if ($row_template_name['syndication']) { echo " " . SYNDICATION_TEMPLATE_ON . " "; } else { echo " " . SYNDICATION_TEMPLATE_OFF . " "; } echo "</div>"; } echo "</div></div>";