Viewing Paste 432
Formated Paste
<?php // SETTINGS // Simple Desk Tables. // SMF Tables we need to clean up after. // My settings brings all the coders to the yard... 'shd_staff_badge' => 'nobadge', 'shd_display_avatar' => 0, 'shd_disable_action_log' => 0, 'shd_ticketnav_style' => 'sd', 'shd_allow_ticket_bbc' => 1, 'shd_allow_ticket_smileys' => 1, 'shd_enabled_bbc' => 1, 'shd_helpdesk_only' => 0, 'shd_attachments_mode' => 'ticket', 'shd_disable_pm' => 0, 'shd_disable_mlist' => 0, 'shd_staff_ticket_self' => 1, 'shd_privacy_display' => 'smart', ); // The default topic title. $topic = 'Welcome to the SimpleDesk Demo'; // The default topic body. $message = 'Welcome to the SimpleDesk Demo.[br] We have provided this demo forum as a means to allow you to demo our software.[br] [br] SimpleDesk Administrator login: Admin / admin[br] SimpleDesk Staff user login: Staff / staff[br] SimpleDesk Regular user login: User / user[br]'; // Join us, SMF. require_once('SSI.php'); // Clean the tables. foreach ($sd_tables as $table) // Collect bbc. foreach (parse_bbc(false) AS $tag) $bbc_tags[] = $tag['tag']; // Update the Settings table. updateSettings($reset_settings); // Clean the SMF topics and messages, leaving only default. This is done because posts are allowed for move to topic/ticket feature // Reset the auto-increment count. // Clean any SMF logs such as read log pretaining to topics and messages caused by SD actions. foreach ($smf_tables as $table) // Do the actual change to message table. $smcFunc['db_query']('', ' UPDATE {db_prefix}messages SET subject = {string:topic}, body = {string:message}, id_msg_modified = 1, poster_name = {string:name}, poster_email = {string:email}, poster_ip = {string:ip}, smileys_enabled = 1, modified_time = 0, modified_name = {string:empty}, icon = {string:xx}, approved = 1, id_member = 0, poster_time = {int:time} WHERE id_msg = 1', 'topic' => $topic, 'message' => $message, 'name' => 'SimpleDesk Team', 'email' => 'void@simpledesk.net', 'ip' => '127.0.0.1', 'empty' => '', 'xx' => 'xx', ) ); // Now topics table. $smcFunc['db_query']('', ' UPDATE {db_prefix}topics SET is_sticky = 0, id_first_msg = 1, id_last_msg = 1, id_member_started = 0, id_member_updated = 0, id_poll = 0, id_previous_board = 0, id_previous_topic = 0, num_replies = 0, num_views = 0, locked = 0, unapproved_posts = 0, approved = 1 // TODO: Fail checks, email webmaster@simpledesk.net on errors and return false for error handler to show a message (Need to setup that email address first [HA!]) // For now this just redirects. redirectexit(); ?>
