Permalink
Browse files

first commit

  • Loading branch information...
0 parents commit 19352b9ea16dc4890f5a2b778abd3a48bea0dee9 @djtarazona djtarazona committed Sep 12, 2011
Showing 1,117 changed files with 163,801 additions and 0 deletions.
@@ -0,0 +1,74 @@
+# Max OS X
+.DS_Store
+Icon?
+
+# Windows
+Thumbs.db
+
+# Thumbnails
+._*
+
+# Files that might appear on external disk
+.Spotlight-V100
+.Trashes
+
+# It's better to unpack these files and commit the raw source because
+# git has its own built in compression methods.
+*.7z
+*.dmg
+*.gz
+*.iso
+*.jar
+*.rar
+*.tar
+*.tar.gz
+*.zip
+*.bzip
+
+# Eclipse
+*.pydevproject
+.project
+.metadata
+local.properties
+.classpath
+.settings/
+.loadpath
+
+# CDT-specific
+.cproject
+
+# PHP
+error_log
+
+# Other
+*.log
+*.tmp
+*.bak
+*.swp
+*~.nib
+
+# Trellis Desk
+/config.php
+/data/*
+!/data/cache
+/data/cache/*
+!/data/cache/index.html
+!/data/cache/htmlpurifier
+!/data/cache/trellis
+/data/cache/htmlpurifier/*
+!/data/cache/htmlpurifier/index.html
+/data/cache/trellis/*
+!/data/cache/trellis/index.html
+!/data/logs
+/data/logs/*
+!/data/logs/index.html
+!/data/skin_compile
+/data/skin_compile/*
+!/data/skin_compile/index.html
+!/data/temp
+/data/temp/*
+!/data/temp/index.html
+!/data/uploads
+/data/uploads/*
+!/data/uploads/index.html
+/install/install.lock

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,14 @@
+This file is part of Trellis Desk.
+
+Trellis Desk is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Trellis Desk is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Trellis Desk. If not, see <http://www.gnu.org/licenses/>.
147 admin.php
@@ -0,0 +1,147 @@
+<?php
+
+/**
+ * Trellis Desk
+ *
+ * @copyright Copyright (C) 2009-2011 ACCORD5. All rights reserved.
+ * @license GNU General Public License version 3 or later; see LICENSE.txt
+ */
+
+define( 'IN_TD', true );
+define( 'IN_TDA', true );
+
+#=============================
+# Lets Play Nice With Output
+#=============================
+
+ob_end_clean();
+ob_start();
+
+#=============================
+# Safe and Secure
+#=============================
+
+if ( function_exists('date_default_timezone_get') )
+{
+ date_default_timezone_set( date_default_timezone_get() );
+}
+
+ini_set( 'register_globals', 0 );
+
+if ( @ini_get( 'register_globals' ) )
+{
+ foreach ( $_REQUEST as $key => $value )
+ {
+ unset( $$key );
+ }
+}
+
+#=============================
+# Define Our Paths
+#=============================
+
+define( "TD_PATH", str_replace( '//', '/', dirname(__FILE__).'/' ) );
+define( 'TD_INC', TD_PATH ."includes/" );
+define( 'TD_CLASS', TD_PATH ."includes/classes/class_" );
+define( 'TD_FUNC', TD_PATH ."includes/functions/func_" );
+define( 'TD_SRC', TD_PATH ."sources/" );
+define( 'TD_SKIN', TD_PATH ."skins/" );
+define( 'TD_ADMIN', TD_PATH ."admin/" );
+
+#=============================
+# Main Class
+#=============================
+
+require_once TD_INC . "trellis.php";
+require_once TD_INC . "trellis_admin.php";
+$trellis = new trellis_admin();
+$trellis->initialize();
+
+#=============================
+# Other Junk
+#=============================
+
+$choice = array(
+ 'admin' => array(
+ 'about',
+ 'home',
+ 'settings',
+ ),
+
+ 'manage' => array(
+ 'articles',
+ 'categories',
+ 'cdfields',
+ 'cpfields',
+ 'departs',
+ 'flags',
+ 'groups',
+ 'news',
+ 'pages',
+ 'priorities',
+ 'rtemplates',
+ 'statuses',
+ 'tickets',
+ 'users',
+ ),
+
+ 'look' => array(
+ 'emails',
+ 'langs',
+ 'skins',
+ ),
+
+ 'tools' => array(
+ 'backup',
+ 'cache',
+ 'logs',
+ 'maint',
+ 'settings',
+ 'stats',
+ ),
+ );
+
+#=============================
+# Require & Run
+#=============================
+
+$folder = $trellis->input['section'];
+
+if ( $folder && in_array( $trellis->input['page'], $choice[ $folder ] ) ) $required = $trellis->input['page'];
+
+if ( ! isset( $required ) )
+{
+ if ( $trellis->input['section'] == 'manage' )
+ {
+ $folder = 'manage';
+ $required = 'tickets';
+ }
+ elseif ( $trellis->input['section'] == 'look' )
+ {
+ $folder = 'look';
+ $required = 'skins';
+ }
+ elseif ( $trellis->input['section'] == 'tools' )
+ {
+ $folder = 'tools';
+ $required = 'settings';
+ }
+ else
+ {
+ $folder = 'admin';
+ $required = 'home';
+ }
+}
+
+$required = "ad_". $required;
+
+require_once TD_ADMIN . $folder ."/". $required .".php";
+
+$required = 'td_'. $required;
+
+$run = new $required();
+$run->trellis =& $trellis;
+
+$run->auto_run();
+
+?>
@@ -0,0 +1,107 @@
+<?php
+
+/**
+ * Trellis Desk
+ *
+ * @copyright Copyright (C) 2009-2011 ACCORD5. All rights reserved.
+ * @license GNU General Public License version 3 or later; see LICENSE.txt
+ */
+
+class td_ad_about {
+
+ private $output = "";
+
+ #=======================================
+ # @ Auto Run
+ #=======================================
+
+ public function auto_run()
+ {
+ $this->trellis->load_functions('admin');
+ $this->trellis->load_lang('home');
+
+ #=============================
+ # Version Check
+ #=============================
+
+ $version_check = $this->trellis->func->admin->version_check();
+
+ if ( $version_check == 1 )
+ {
+ $version_img_url = '<! IMG_DIR !>/vc_update_available.jpg';
+ }
+ elseif ( $version_check == 2 )
+ {
+ $version_img_url = '<! IMG_DIR !>/vc_up_to_date.jpg';
+ }
+ else
+ {
+ $version_img_url = '<! IMG_DIR !>/vc_unable_to_check.jpg';
+ }
+
+ #=============================
+ # Sidebar Menu
+ #=============================
+
+ $mysql_version = mysql_get_server_info();
+
+ if ( strpos( $mysql_version, '-' ) )
+ {
+ $mysql_version = substr( $mysql_version, 0, strpos( $mysql_version, '-' ) );
+ }
+
+ if ( $this->trellis->cache->data['misc']['vcheck_time'] )
+ {
+ $vcheck_date = $this->trellis->td_timestamp( array( 'time' => $this->trellis->cache->data['misc']['vcheck_time'], 'format' => 'date' ) );
+ }
+ else
+ {
+ $vcheck_date = '{lang.check_now}';
+ }
+
+ $system_status_html = "<table width='100%' border='0' cellspacing='0' cellpadding='0' class='blockstatus'>
+ <tr>
+ <td colspan='2' class='statusbadge'><a href='http://www.accord5.com/trellis/latest' target='_blank'><img src='{$version_img_url}' alt='{lang.version_check}' /></a></td>
+ </tr>
+ <tr>
+ <td class='statusleft'><strong>{lang.version_check}</strong></td>
+ <td class='statusright'><a href='<! TD_URL !>/admin.php?section=admin&amp;page=about&amp;vcheck=1' title='{lang.check_now}'>". $vcheck_date ."</a></td>
+ </tr>
+ <tr>
+ <td class='statusleft'><strong>{lang.product_version}</strong></td>
+ <td class='statusright'>{$this->trellis->version_short} ({$this->trellis->version_number})</td>
+ </tr>
+ <td class='statusleft'><strong>{lang.php_version}</strong></td>
+ <td class='statusright'>". phpversion() ."</td>
+
+ </tr>
+ <tr>
+ <td class='statusleft'><strong>{lang.mysql_version}</strong></td>
+ <td class='statusright'>". $mysql_version ."</td>
+ </tr>
+ </table>";
+
+ $this->trellis->skin->add_sidebar_block( 'System Status', $system_status_html );
+
+ #=============================
+ # Do Output
+ #=============================
+
+ $this->output .= "<div id='ticketroll'>
+ <div class='acpwelcome'><img src='<! IMG_DIR !>/td_welcome_acphome.png' alt='Welcome to Trellis Desk 2' /></div>
+ ". $this->trellis->skin->group_title( 'About Trellis Desk' ) ."
+ <div class='option1' style='font-weight: normal; margin-bottom: 8px;'><strong>Help is on the way.</strong> Trellis Desk is a powerful and robust help desk solution for your business. Improve your company's service by allowing your customers to quickly and easily submit support tickets to your team. Trellis Desk sports a range of advanced features that enable your business to handle customer support more efficiently. Plus, it's completely free &mdash; you'll never have to pay any license fees to use Trellis Desk.<br /><br />Show your appreciation and support by helping out your Lead Trellis Desk Developer, DJ, with a <a href='http://www.djtarazona.com/index.php?page=donate' target='_blank'><strong>donation</strong></a>.</div>
+ ". $this->trellis->skin->group_title( 'Credits' ) ."
+ <div class='option1' style='font-weight: normal;'>Thanks to everyone who has contributed to Trellis Desk. We will have a full, up-to-date list of appropriate credits here soon.</div>
+ </div>";
+
+ $this->trellis->skin->add_sidebar_general( 'Icon Usage', 'We tip our hats to Yusuke Kamiyamane (<a href="http://www.pinvoke.com" target="_blank">pinvoke.com</a>) for graciously giving away his Fugue iconset to the world. Also, much thanks to Mark James (<a href="http://www.famfamfam.com" target="_blank">famfamfam.com</a>) for sharing his Silk iconset. These icons help make Trellis Desk look pretty.' );
+
+ $this->trellis->skin->add_output( $this->output );
+
+ $this->trellis->skin->do_output();
+ }
+
+}
+
+?>
Oops, something went wrong.

0 comments on commit 19352b9

Please sign in to comment.