Can't make it work
Hi!,
It's a great theme and language pack, but i can't seem to make it work, i thought i had the same problem than neil, but i fixed it and still can't make it work, seems that its not getting the CSS grey.php. don't know why.
Could you help me please? these are the modifications i did:
Client/Config.php
<?
// full url of your theme
define('CTHEME_URL','http://soporte.neocorps.com/client/');
// not sure why this is here
define('CTHEME_PATH',CLIENTINC_DIR);
// show ticked ID input as password instead of text?
// set it to 0 if you want osTicket default behaviour
define('CTHEME_TICKETPWD',0);
// default language
// %file.lang.php should exist in root foolder in order to work
// view the default language files in order to create a new one ;)
define('CTHEME_LANG','es');
// default language 'catching'
// for more info read the ctheme-lang.inc.php file
define('CTHEME_LANGC',1);
// include language class and create the object
include_once(CLIENTINC_DIR.'ctheme-lang.inc.php');
include_once(CLIENTINC_DIR.CTHEME_LANG.'.lang.php');
$ctlang = new ctlang;
// in your css folder you have 2 files, default.php and grey.php
// grey.php is the default value, however you might change/create
// a new one with your stuff and use it here
define('CTHEME_CSS','grey.php');
// set it to 1 if you want to enable captcha, read the README file first!
define('CTHEME_CAPTCHA',0);
?>
Index.php
<?php
/*********************************************************************
index.php
Helpdesk landing page. Please customize it to fit your needs.
Peter Rotich <peter@osticket.com>
Copyright (c) 2006,2007,2008 osTicket
http://www.osticket.com
Released under the GNU General Public License WITHOUT ANY WARRANTY.
See LICENSE.TXT for details.
vim: expandtab sw=4 ts=4 sts=4:
$Id: $
**********************************************************************/
require('client.inc.php');
require(CLIENTINC_DIR.'header.inc.php');
// we need to include the theme's main.inc.php file which displays the right info
require(CLIENTINC_DIR.'main.inc.php');
?>
<div>
<p>Welcome to the support center.</p>
<p>In order to streamline support requests and better serve you, we utilize a support ticket system. Every support request is assigned a unique ticket number which you can use to track the progress and responses online. For your reference we provide complete archives and history of all your support requests.</p>
<br>
<div id="index">
<div class="box">
<img src="./images/new_ticket_title.jpg" width="186" height="50" align="left">
<p>Submit a new support request. Please provide as much detail as possible so we can best assist you. To update a previously submitted ticket, please use the form to the right. A valid email address is required.</p>
<p><a class="btn" href="open.php">Open New Ticket</a>
</div>
<img id="bar" src="./images/verticalbar.jpg" width="21" height="266" alt="|">
<div class="box">
<img src="./images/ticket_status_title.jpg" width="186" height="50" align="right">
<p>Check status of previously opened ticket. we provide archives and history of all your support requests complete with responses.</p>
<form action="view.php" method="post">
<fieldset>
<label>Email:</label>
<input type="text" name="lemail">
</fieldset>
<fieldset>
<label>Ticket#:</label>
<input type="text" name="lticket">
</fieldset>
<br>
<input type="submit" class="btn" value="Check Status">
</form>
</div>
</div>
<div style="clear"></div>
</div> //
<? require(CLIENTINC_DIR.'footer.inc.php'); ?>
login.php
<?php
/*********************************************************************
index.php
Client Login
Peter Rotich <peter@osticket.com>
Copyright (c) 2006,2007,2008 osTicket
http://www.osticket.com
Released under the GNU General Public License WITHOUT ANY WARRANTY.
See LICENSE.TXT for details.
vim: expandtab sw=4 ts=4 sts=4:
$Id: $
**********************************************************************/
require_once('main.inc.php');
if(!defined('INCLUDE_DIR')) die('Fatal Error');
define('CLIENTINC_DIR','client/');
define('OSTCLIENTINC',TRUE); //make includes happy
require_once(INCLUDE_DIR.'class.client.php');
require_once(INCLUDE_DIR.'class.ticket.php');
//We are ready baby
$loginmsg='Authentication Required';
if($_POST && (!empty($_POST) && !empty($_POST))):
$loginmsg='Authentication Required';
$email=trim($_POST);
$ticketID=trim($_POST);
//$_SESSION=array(); #Uncomment to disable login strikes.
//Check time for last max failed login attempt strike.
//Must wait for 5 minutes after each strike.
if($_SESSION && (time()-$_SESSION<5*60))
$errors='You\'ve reached maximum failed login attempts allowed. Try again after 5 minutes or <a href="open.php">open a new ticket</a>';
//See if we can fetch local ticket id associated with the ID given
if(!$errors && is_numeric($ticketID) && Validator:($email) && ($tid=Ticket:($ticketID))) {
//At this point we know the ticket is valid.
$ticket= new Ticket($tid);
//TODO: 1) Check how old the ticket is...3 months max?? 2) Must be the latest 5 tickets??
//Check the email given.
if($ticket->getId() && strcasecmp($ticket->getEMail(),$email)==0){
//valid match...create session goodies for the client.
$user = new ClientSession($email,$ticket->getId());
$_SESSION=array(); //clear.
$_SESSION =$ticket->getEmail(); //Email
$_SESSION =$ticket->getExtId(); //Ticket ID --acts as password when used with email. See above.
$_SESSION =$user->getSessionToken();
$_SESSION=$cfg->getTZoffset();
$_SESSION=$cfg->observeDaylightSaving();
//Redirect view.php
<USERMENTION username="header">@header</USERMENTION>("Location: view.php");
require('view.php'); //Just incase. of header already sent error.
exit;
}
}
//If we get to this point we know the login failed.
//TODO: login strikes should be DB based for better security checks ( session can be reset!)
$loginmsg='Invalid login';
$_SESSION+=1;
if(!$errors && $_SESSION>3) {
$errors='Forgot your login info? Please <a href="open.php">open a new ticket</a>.';
$_SESSION=time();
if($cfg->alertONLoginError()) {
$alert='Excessive login attempts by a client'."\n".
'Email: '.$_POST."\n".'Ticket#: '.$_POST."\n".
'IP: '.$_SERVER."\n".'Time:'.date('M j, Y, g a T')."\n\n".
'Attempts #'.$_SESSION;
Misc:('Excessive login attempts (client)',$alert);
}
}
endif;
require(CLIENTINC_DIR.'header.inc.php');
require(CLIENTINC_DIR.'login.inc.php');
require(CLIENTINC_DIR.'footer.inc.php');
?>
Client.inc.php
<?php
/*********************************************************************
client.inc.php
File included on every client page
Peter Rotich <peter@osticket.com>
Copyright (c) 2006,2007,2008 osTicket
http://www.osticket.com
Released under the GNU General Public License WITHOUT ANY WARRANTY.
See LICENSE.TXT for details.
vim: expandtab sw=4 ts=4 sts=4:
$Id: $
**********************************************************************/
if(!strcasecmp(basename($_SERVER),basename(__FILE__))) die('Habari rafiki? ... kwaheri');
if(!file_exists('main.inc.php')) die('Fatal Error.');
require_once('main.inc.php');
if(!defined('INCLUDE_DIR')) die('Fatal error');
/*Some more include defines specific to client only */
define('CLIENTINC_DIR','client/');
define('OSTCLIENTINC',TRUE);
//Check if config info got loaded.
if (!is_object($cfg) || !$cfg->getId()) die('Support ticket system is offline');
//Check the status of the HelpDesk.
if($cfg->isHelpDeskOffline()) {
include('offline.php');
exit;
}
/* include what is needed on client stuff */
require_once(INCLUDE_DIR.'class.client.php');
require_once(INCLUDE_DIR.'class.ticket.php');
require_once(INCLUDE_DIR.'class.dept.php');
//clear some vars
$errors=array();
$msg='';
//Pages which do not require login.
$nologinpages=array('open.php','index.php');
$thisclient=null;
//Make sure the user is valid..before doing anything else.
if($_SESSION && $_SESSION)
$thisclient = new ClientSession($_SESSION,$_SESSION);
//print_r($_SESSION);
//is the user logged in?
if($thisclient && $thisclient->getId() && $thisclient->isValid()){
$thisclient->refreshSession();
}elseif(!$_SERVER || !in_array(basename($_SERVER),$nologinpages)){
require('login.php');
exit;
}
?>
If you see any error, please point it for me!
Thank you! :
--------------------------------
Edit, the error log showed this:
PHP Warning: require(client/’mainincphp’) : failed to open stream: No such file or directory in /home/neoweb/public_html/soporte/index.php on line 52