Exemplo n.º 1
0
 /**
  * Ensures that a class is defined.  If not, attempts to include the file
  * using the provided path. If unable to locate the class, an IncludeException
  * will be thrown.  The path that will be used for include_once is
  * $classpath . "/" . $classname . ".php"
  * 
  * @param string name of class (ex Phreeze)
  * @param string or array [optional] the relative path(s) where the file would be found
  */
 public static function RequireClass($classname, $classpath = "")
 {
     if (class_exists($classname)) {
         return true;
     }
     // normalize this as an array
     $classpaths = is_array($classpath) ? $classpath : array($classpath);
     $attempts = "";
     foreach ($classpaths as $path) {
         if (class_exists($classname)) {
             break;
         }
         try {
             // append a directory separater if necessary
             if ($path && substr($path, -1) != "/") {
                 $path .= "/";
             }
             Includer::IncludeFile($path . $classname . ".php");
         } catch (IncludeException $ex) {
             $attempts .= " " . $ex->getMessage();
         }
     }
     if (!class_exists($classname)) {
         // the class still isn't defined so there was a problem including the model
         throw new IncludeException("Unable to locate class '{$classname}': " . $attempts);
     }
 }
Exemplo n.º 2
0
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file deals with visitors that have been diverted when requesting a chat
// because there are no operators or all the operators are busy
include_once '../class/include.php';
$inc = new Includer();
$inc->template();
$inc->department();
$inc->email();
$inc->chat();
if ($GLOBALS['chat']->blocked()) {
    $GLOBALS['template']->assign('text', $GLOBALS['lang']['blocked']);
    $GLOBALS['template']->display('plain.tpl');
    $inc->finished();
    exit;
}
if (isset($_GET['departmentid'])) {
    if ($_GET['departmentid'] !== '') {
        $GLOBALS['template']->assign('departmentid', addslashes($_GET['departmentid']));
    } else {
        $GLOBALS['template']->assign('departmentid', '0');
// Help Center Live 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 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file allows administration of departments messages
include_once '../class/include.php';
$inc = new Includer();
$inc->auth();
$inc->template();
$inc->department();
// Check to see if the person is not logged in
$GLOBALS['auth']->check_logout();
// Define the three sets of links in the template
if ($GLOBALS['auth']->admin()) {
    $GLOBALS['template']->links('conf', 'conf');
} else {
    header('Location: ' . $GLOBALS['conf']['url'] . '/admin/index.php');
}
$GLOBALS['template']->assign('links_main', array(array('title' => $GLOBALS['lang']['view_all'], 'url' => $GLOBALS['conf']['url'] . '/admin/departments.php?view'), array('title' => $GLOBALS['lang']['add'], 'url' => $GLOBALS['conf']['url'] . '/admin/departments.php?add'), array('title' => $GLOBALS['lang']['assigns'], 'url' => $GLOBALS['conf']['url'] . '/admin/assigns.php')));
if (isset($_GET['add'])) {
    $GLOBALS['template']->assign('action', 'add');
} elseif (isset($_POST['add'])) {
Exemplo n.º 4
0
// Help Center Live 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 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file is a relay between the javascript chat class and the php classes
include_once '../../class/include.php';
$inc = new Includer();
$inc->chat();
$inc->operator();
$inc->live();
$inc->aardvark();
if ($GLOBALS['chat']->blocked()) {
    $inc->finished();
    exit;
}
// Receive all the variables sent into the file
$variables = $aardvark->receive();
if (!isset($aardvark->vars['id'])) {
    $aardvark->vars['id'] = '';
}
if (!isset($aardvark->vars['chatid'])) {
    $aardvark->vars['chatid'] = '';
Exemplo n.º 5
0
// Help Center Live 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 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file is called when a chat ends
include_once '../../class/include.php';
$inc = new Includer();
$inc->template();
$inc->auth();
$inc->operator();
$inc->department();
$inc->chat();
$inc->db();
$inc->transcript();
$inc->email();
if (isset($_GET['admin'])) {
    $GLOBALS['template']->assign('admin', 'true');
    $admin = 'true';
} else {
    $GLOBALS['template']->assign('admin', 'false');
    $admin = 'false';
}
Exemplo n.º 6
0
// Help Center Live 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 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file allows administration of the operator's details
include_once '../class/include.php';
$inc = new Includer();
$inc->auth();
$inc->template();
$inc->operator();
// Check to see if the person is not logged in
$GLOBALS['auth']->check_logout();
// Define the three sets of links in the template
if ($GLOBALS['auth']->admin()) {
    $GLOBALS['template']->links('admin', 'admin');
} else {
    $GLOBALS['template']->links('operator', 'operator');
}
if (isset($_POST['submit'])) {
    $GLOBALS['template']->assign('alert', $GLOBALS['operator']->update(0, addslashes($_POST['old_password']), addslashes($_POST['new_password']), addslashes($_POST['new_password_again']), addslashes($_POST['firstname']), addslashes($_POST['lastname']), addslashes($_POST['email']), $_FILES['picture'], addslashes($_POST['showpic']), addslashes($_POST['autosave'])));
} else {
    $GLOBALS['template']->assign('alert', '');
Exemplo n.º 7
0
// This file is part of Help Center Live.
// Help Center Live 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 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file checks for updates on the HCL site
include_once '../class/include.php';
$inc = new Includer();
$inc->template();
$inc->mothership();
// Assign the page's title and the content template that needs to be used
$GLOBALS['template']->assign('title', $GLOBALS['lang']['updates']);
$GLOBALS['template']->assign('content', 'plain.tpl');
if ($GLOBALS['mothership']->check_updates()) {
    $GLOBALS['template']->assign('text', $GLOBALS['lang']['update_available'] . '<br /><a href="http://sourceforge.net/project/showfiles.php?group_id=93857&package_id=99667">' . $GLOBALS['lang']['update_download'] . '</a>');
} else {
    $GLOBALS['template']->assign('text', $GLOBALS['lang']['update_current']);
}
// Display the output
$GLOBALS['template']->display('update.tpl');
// do events that need to be done at the end of the file
$inc->finished();
Exemplo n.º 8
0
 /**
  * Load the data driver
  * @throws Exception
  */
 public function LoadDriver()
 {
     if ($this->_driver == null) {
         require_once "verysimple/IO/Includer.php";
         // the driver was not explicitly provided so we will try to create one from
         // the connection setting based on the database types that we do know about
         switch ($this->ConnectionSetting->Type) {
             case "mysql":
                 include_once "verysimple/DB/DataDriver/MySQL.php";
                 $this->_driver = new DataDriverMySQL();
                 break;
             case "mysqli":
                 include_once "verysimple/DB/DataDriver/MySQLi.php";
                 $this->_driver = new DataDriverMySQLi();
                 break;
             case "sqlite":
                 include_once "verysimple/DB/DataDriver/SQLite.php";
                 $this->_driver = new DataDriverSQLite();
                 break;
             default:
                 try {
                     Includer::IncludeFile("verysimple/DB/DataDriver/" . $this->ConnectionSetting->Type . ".php");
                     $classname = "DataDriver" . $this->ConnectionSetting->Type;
                     $this->_driver = new $classname();
                 } catch (IncludeException $ex) {
                     throw new Exception('Unknown DataDriver "' . $this->ConnectionSetting->Type . '" specified in connection settings');
                 }
                 break;
         }
         DataAdapter::$DRIVER_INSTANCE = $this->_driver;
     }
 }
Exemplo n.º 9
0
 /**
  * If the map class is not already defined, attempts to require_once the definition.
  * If the Map file cannot be located, an exception is thrown
  *
  * @access public
  * @param string $objectclass The name of the object map class
  */
 public function IncludeMap($objectclass)
 {
     Includer::RequireClass($objectclass, "Model/DAO/");
 }
Exemplo n.º 10
0
// Help Center Live 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 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file allows administration of chat transcripts
include_once '../class/include.php';
$inc = new Includer();
$inc->auth();
$inc->template();
$inc->canned();
$inc->department();
$inc->transcript();
// Check to see if the person is not logged in
$GLOBALS['auth']->check_logout();
// Define the three sets of links in the template
if ($GLOBALS['auth']->admin()) {
    if (isset($_GET['admin'])) {
        $GLOBALS['template']->links('conf', 'conf');
    } else {
        $GLOBALS['template']->links('admin', 'admin');
    }
} else {
Exemplo n.º 11
0
// Help Center Live 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 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file displays the chat icon
include_once '../class/include.php';
$inc = new Includer();
$inc->image();
$inc->operator();
$inc->live();
if (!isset($_GET['departmentid'])) {
    $_GET['departmentid'] = '0';
}
if (isset($_GET['picture']) && isset($_GET['id'])) {
    header('Content-Type: image/gif');
    echo $GLOBALS['operator']->picture(addslashes($_GET['id']));
} else {
    if (isset($_GET['status'])) {
        $icon = $GLOBALS['image']->icon(addslashes($_GET['status']), addslashes($_GET['departmentid']));
    } else {
        if ($GLOBALS['live']->status_department(addslashes($_GET['departmentid']))) {
            $icon = $GLOBALS['image']->icon('online', addslashes($_GET['departmentid']));
Exemplo n.º 12
0
<?php

// Copyright (c) 2005 Help Center Live. All Rights Reserved
// This file is part of Help Center Live.
// Help Center Live 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 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file is used to carry out cobrowse functions
include_once '../class/include.php';
$inc = new Includer();
$inc->cobrowse();
$inc->live();
if (isset($_GET['changepage'])) {
    header('Location: ' . $GLOBALS['cobrowse']->getpage($GLOBALS['live']->chatid()));
}
// do events that need to be done at the end of the file
$inc->finished();
Exemplo n.º 13
0
 /**
  * Run any php upgrade scripts which are required
  *
  * @param int  $version Version upgrading from.
  * @param bool $quiet   Suppress errors.  Don't use this.
  *
  * @return bool
  */
 protected function upgradeCode($version, $quiet = false)
 {
     $version = (int) $version;
     $upgrade_path = elgg_get_engine_path() . '/lib/upgrades/';
     $processed_upgrades = $this->getProcessedUpgrades();
     $upgrade_files = $this->getUpgradeFiles($upgrade_path);
     if ($upgrade_files === false) {
         return false;
     }
     $upgrades = $this->getUnprocessedUpgrades($upgrade_files, $processed_upgrades);
     // Sort and execute
     sort($upgrades);
     foreach ($upgrades as $upgrade) {
         $upgrade_version = $this->getUpgradeFileVersion($upgrade);
         $success = true;
         if ($upgrade_version <= $version) {
             // skip upgrade files from before the installation version of Elgg
             // because the upgrade files from before the installation version aren't
             // added to the database.
             continue;
         }
         // hide all errors.
         if ($quiet) {
             // hide include errors as well as any exceptions that might happen
             try {
                 if (!@Includer::includeFile("{$upgrade_path}/{$upgrade}")) {
                     $success = false;
                     $this->logger->error("Could not include {$upgrade_path}/{$upgrade}");
                 }
             } catch (\Exception $e) {
                 $success = false;
                 $this->logger->error($e->getMessage());
             }
         } else {
             if (!Includer::includeFile("{$upgrade_path}/{$upgrade}")) {
                 $success = false;
                 $this->logger->error("Could not include {$upgrade_path}/{$upgrade}");
             }
         }
         if ($success) {
             // don't set the version to a lower number in instances where an upgrade
             // has been merged from a lower version of Elgg
             if ($upgrade_version > $version) {
                 $this->config->save('version', $upgrade_version);
             }
             // incrementally set upgrade so we know where to start if something fails.
             $this->setProcessedUpgrade($upgrade);
         } else {
             return false;
         }
     }
     return true;
 }
Exemplo n.º 14
0
// Help Center Live 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 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file contains the operators special capabilites during a chat
include_once '../../class/include.php';
$inc = new Includer();
$inc->template();
$inc->chat();
$inc->monitor();
$inc->db();
$inc->file();
$inc->live();
$inc->canned();
if (isset($_GET['admin'])) {
    $GLOBALS['template']->assign('admin', 'true');
} else {
    $GLOBALS['template']->assign('admin', 'false');
}
$GLOBALS['chat']->assign(addslashes($_GET['chatid']));
$GLOBALS['template']->assign('chatid', addslashes($_GET['chatid']));
if (isset($_POST['submit'])) {
Exemplo n.º 15
0
// Help Center Live 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 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file forms the main chat window
include_once '../../class/include.php';
$inc = new Includer();
$inc->template();
$inc->auth();
$inc->operator();
$inc->department();
$inc->chat();
$inc->db();
$inc->chat();
if ($GLOBALS['chat']->blocked()) {
    $GLOBALS['template']->assign('text', $GLOBALS['lang']['blocked']);
    $GLOBALS['template']->display('plain.tpl');
    $inc->finished();
    exit;
}
if (isset($_GET['admin'])) {
    $GLOBALS['template']->assign('admin', 'true');
Exemplo n.º 16
0
// Help Center Live 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 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file grabs information on a visitor
include_once '../../class/include.php';
$inc = new Includer();
$inc->auth();
$inc->template();
$inc->monitor();
// Check to see if the person is not logged in
$GLOBALS['auth']->check_logout();
$GLOBALS['template']->assign('info', $GLOBALS['monitor']->info(addslashes($_GET['chatid'])));
if (isset($_GET['history'])) {
    $GLOBALS['template']->assign('history', 'true');
} else {
    $GLOBALS['template']->assign('history', 'false');
}
// Include the javascript files
$GLOBALS['template']->assign('javascript', '');
// Display the output
$GLOBALS['template']->display('monitor_info.tpl');
Exemplo n.º 17
0
// Help Center Live 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 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file is used to include the javascript files that we want to use
include_once '../include.php';
$inc = new Includer();
$inc->chat();
$inc->live();
$inc->operator();
$inc->cobrowse();
if (isset($_GET['opchat']) && isset($_GET['chatid'])) {
    $chatid = addslashes($_GET['chatid']);
} elseif (isset($_GET['opchat']) && !isset($_GET['chatid'])) {
    $chatid = 'op_' . $GLOBALS['operator']->id();
} else {
    if (isset($_GET['live']) || isset($_GET['cobrowse']) || isset($_GET['request'])) {
        $GLOBALS['live']->newvisitor();
        $chatid = $GLOBALS['live']->chatid();
    }
    if (isset($_GET['chat']) && isset($_GET['admin'])) {
        $chatid = addslashes($_GET['chatid']);
Exemplo n.º 18
0
// Copyright (c) 2005 Help Center Live. All Rights Reserved
// This file is part of Help Center Live.
// Help Center Live 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 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// The main index file. A redirect to the admin directory
// has been put here because that is probably most useful
include_once "./class/include.php";
$inc = new Includer();
$inc->module();
if ($GLOBALS['module']->exists('HelpCenter')) {
    if ($GLOBALS['module']->active('HelpCenter')) {
        header('Location: ' . $conf['url'] . '/module.php?module=HelpCenter');
    } else {
        header('Location: ' . $conf['url'] . '/admin/index.php');
    }
} else {
    header('Location: ' . $conf['url'] . '/admin/index.php');
}
// do events that need to be done at the end of the file
$inc->finished();
Exemplo n.º 19
0
// Help Center Live 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 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file is the landing page for requesting live help
include_once '../class/include.php';
$inc = new Includer();
$inc->template();
$inc->live();
$inc->chat();
if ($GLOBALS['chat']->blocked()) {
    $GLOBALS['template']->assign('text', $GLOBALS['lang']['blocked']);
    $GLOBALS['template']->display('plain.tpl');
    $inc->finished();
    exit;
}
if (isset($_GET['departmentid'])) {
    $department_show = false;
    $departmentid = addslashes($_GET['departmentid']);
} else {
    $department_show = true;
    $departmentid = '';
Exemplo n.º 20
0
// Help Center Live 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 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file is used to initiate chat sessions with visitors
include_once '../../class/include.php';
$inc = new Includer();
$inc->auth();
$inc->template();
$inc->monitor();
$inc->department();
$inc->operator();
// Check to see if the person is not logged in
$GLOBALS['auth']->check_logout();
$GLOBALS['template']->assign('chatid', $_GET['chatid']);
$GLOBALS['template']->assign('info', $GLOBALS['monitor']->info(addslashes($_GET['chatid'])));
$GLOBALS['template']->assign('departments', $GLOBALS['department']->listall($GLOBALS['operator']->id()));
if (isset($_POST['department'])) {
    // Initiate the chat session
    $GLOBALS['monitor']->initiate(addslashes($_POST['department']), $GLOBALS['operator']->id(), addslashes($_GET['chatid']));
    // Close the window
    $GLOBALS['template']->assign('onload', ' onload="window.close()"');
Exemplo n.º 21
0
// Help Center Live 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 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file allows administration of the assigning of operators to departments
include_once '../class/include.php';
$inc = new Includer();
$inc->auth();
$inc->template();
$inc->assign();
// Check to see if the person is not logged in
$GLOBALS['auth']->check_logout();
// Define the three sets of links in the template
if ($GLOBALS['auth']->admin()) {
    $GLOBALS['template']->links('conf', 'conf');
} else {
    header('Location: ' . $GLOBALS['conf']['url'] . '/admin/index.php');
}
$GLOBALS['template']->assign('links_main', array(array('title' => $GLOBALS['lang']['view_all'], 'url' => $GLOBALS['conf']['url'] . '/admin/assigns.php'), array('title' => $GLOBALS['lang']['operators'], 'url' => $GLOBALS['conf']['url'] . '/admin/operators.php'), array('title' => $GLOBALS['lang']['departments'], 'url' => $GLOBALS['conf']['url'] . '/admin/departments.php')));
if (isset($_POST['edit'])) {
    $GLOBALS['template']->assign('text', $GLOBALS['lang']['assigns_updated']);
    $GLOBALS['assign']->delete_department(addslashes($_POST['id']));
Exemplo n.º 22
0
// Help Center Live 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 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file forces the download of a transferred file
include_once '../../class/include.php';
$inc = new Includer();
$inc->db();
$inc->file();
if (isset($_GET['admin'])) {
    $admin = 'true';
} else {
    $admin = 'false';
}
if (isset($_GET['client'])) {
    $client = 'true';
} else {
    $client = 'false';
}
if (isset($_GET['id'])) {
    if ($files = $GLOBALS['file']->get($admin, addslashes($_GET['id']), $client)) {
        header("Pragma: public");
Exemplo n.º 23
0
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file is a wrapper for the module files
include_once '../class/include.php';
global $inc;
$inc = new Includer();
$inc->auth();
$inc->template();
$inc->module();
// Check to see if the person is not logged in
$GLOBALS['auth']->check_logout();
// Define the three sets of links in the template
if (isset($_GET['type'])) {
    if ($_GET['type'] == 'operator') {
        if ($GLOBALS['auth']->operator()) {
            $GLOBALS['template']->links('operator', 'operator');
        }
    } elseif ($_GET['type'] == 'admin') {
        if ($GLOBALS['auth']->admin()) {
            $GLOBALS['template']->links('admin', 'admin');
        }
Exemplo n.º 24
0
// Help Center Live 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 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file allows administration of hot pages
include_once '../class/include.php';
$inc = new Includer();
$inc->auth();
$inc->template();
$inc->hotpage();
// Check to see if the person is not logged in
$GLOBALS['auth']->check_logout();
// Define the three sets of links in the template
if ($GLOBALS['auth']->admin()) {
    $GLOBALS['template']->links('conf', 'conf');
} else {
    header('Location: ' . $GLOBALS['conf']['url'] . '/admin/index.php');
}
$GLOBALS['template']->assign('links_main', array(array('title' => $GLOBALS['lang']['view_all'], 'url' => $GLOBALS['conf']['url'] . '/admin/hotpages.php?view'), array('title' => $GLOBALS['lang']['add'], 'url' => $GLOBALS['conf']['url'] . '/admin/hotpages.php?add')));
if (isset($_GET['add'])) {
    $GLOBALS['template']->assign('action', 'add');
} elseif (isset($_POST['add'])) {
Exemplo n.º 25
0
 /**
  * If the type is not already defined, attempts to require_once the definition.
  * If the Model file cannot be located, an exception is thrown
  *
  * @access public
  * @param string $objectclass The name of the object class
  */
 public function IncludeModel($objectclass)
 {
     Includer::RequireClass($objectclass, array("Model/", "Reporter/"));
 }
Exemplo n.º 26
0
 /**
  * If the map class is not already defined, attempts to require_once the definition.
  * If the Map file cannot be located, an exception is thrown
  *
  * @access public
  * @param string $objectclass The name of the object map class
  */
 public function IncludeMap($objectclass)
 {
     try {
         Includer::RequireClass($objectclass, "Model/DAO/");
     } catch (IncludeException $ex) {
         throw new Exception($ex->getMessage() . '.  If a map file does not exist then ' . get_class($this) . ' can implement GetFieldFromProp instead.');
     }
 }
Exemplo n.º 27
0
// Help Center Live 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 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file shows the main admin screen
include_once '../class/include.php';
$inc = new Includer();
$inc->auth();
$inc->template();
$inc->notes();
// Check to see if the person is not logged in
$GLOBALS['auth']->check_logout();
// Check if any POST variables are passed into the file and act accordingly
if (isset($_POST['add'])) {
    $GLOBALS['notes']->add(addslashes($_POST['subject']), addslashes($_POST['message']));
} elseif (isset($_POST['edit'])) {
    $GLOBALS['notes']->update(addslashes($_POST['id']), addslashes($_POST['subject']), addslashes($_POST['message']));
} elseif (isset($_POST['delete'])) {
    $GLOBALS['notes']->delete(addslashes($_POST['id']));
}
// Check if any GET variables are passed into the file and act accordingly
if (isset($_GET['add'])) {
Exemplo n.º 28
0
// Help Center Live 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 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file allows the sending of messages
include_once '../../class/include.php';
$inc = new Includer();
$inc->template();
$inc->operator();
$inc->chat();
$inc->db();
if (isset($_GET['admin'])) {
    $GLOBALS['template']->assign('admin', 'true');
} else {
    $GLOBALS['template']->assign('admin', 'false');
}
if (isset($_GET['opchat'])) {
    $GLOBALS['template']->assign('opchat', 'true');
} else {
    $GLOBALS['template']->assign('opchat', 'false');
}
$GLOBALS['chat']->assign(addslashes($_GET['chatid']));
Exemplo n.º 29
0
// Help Center Live 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 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file allows the uploading of files that are going to be transferred
include_once '../../class/include.php';
$inc = new Includer();
$inc->template();
$inc->file();
if (isset($_FILES['file'])) {
    $GLOBALS['template']->assign('submit', 'true');
    if ($_FILES["file"]["size"] > 0) {
        $size = $GLOBALS['file']->insert('false', $_FILES["file"], addslashes($_GET['chatid']));
        $GLOBALS['template']->assign('onload', ' onload="window.opener.parent.window.Chat.file(\'' . $size . '\');window.close();"');
        $GLOBALS['template']->assign('fail', 'false');
    } else {
        $GLOBALS['template']->assign('fail', 'true');
    }
}
$GLOBALS['template']->assign('chatid', addslashes($_GET['chatid']));
$GLOBALS['template']->assign('max_size', $GLOBALS['file']->max_size());
// Display the output
Exemplo n.º 30
0
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
// Help Center Live 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 Help Center Live; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Contributors: Michael Bird
// File Comments:
// This file contains a relay to connect the javascript classes to the php classes
// in the request monitor
include_once '../../class/include.php';
$inc = new Includer();
$inc->auth();
$inc->operator();
$inc->monitor();
$inc->aardvark();
// Receive all the variables sent into the file
$variables = $aardvark->receive();
// Check to see if the person is not logged in
$GLOBALS['auth']->check_logout();
if (!isset($aardvark->vars['id'])) {
    $aardvark->vars['id'] = '';
}
if (!isset($aardvark->vars['chatid'])) {
    $aardvark->vars['chatid'] = '';
}
if (isset($aardvark->vars['monitor'])) {