Skip to content

Commit

Permalink
Merge pull request OsTicket-Reloaded#27 from rleal/master
Browse files Browse the repository at this point in the history
no more open_short_tag requirement
  • Loading branch information
carlosdelfino committed Sep 4, 2012
2 parents d8ad3af + 9b08676 commit c2f7f0e
Show file tree
Hide file tree
Showing 50 changed files with 1,735 additions and 1,454 deletions.
20 changes: 10 additions & 10 deletions include/client/header.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@
<html lang="<?php echo $trl->getLang(); ?>">
<head>
<meta http-equiv="content-type" content="text/html; charset=<?php echo $trl->getCharset(); ?>">
<title><?=Format::htmlchars($title)?></title>
<title><?php echo Format::htmlchars($title)?></title>
<link rel="stylesheet" href="./styles/main.css" media="screen">
<link rel="stylesheet" href="./styles/colors.css" media="screen">
</head>
<body dir="<?php echo $dir; ?>">
<div id="container">
<div id="header">
<a id="logo" href="index.php" title="<?= $trl->translate('TEXT_SUPPORT_CENTER'); ?>"><img src="./images/logo2.jpg" border=0 alt="Support Center"></a>
<p><?= $trl->translate('TEXT_SUPPORT_TICKET_SISTEM'); ?></p>
<a id="logo" href="index.php" title="<?php echo $trl->translate('TEXT_SUPPORT_CENTER'); ?>"><img src="./images/logo2.jpg" border=0 alt="Support Center"></a>
<p><?php echo $trl->translate('TEXT_SUPPORT_TICKET_SISTEM'); ?></p>
</div>
<ul id="nav">
<?
<?php
if($thisclient && is_object($thisclient) && $thisclient->isValid()) {?>
<li><a class="log_out" href="logout.php"><?= $trl->translate('TEXT_LOG_OUT'); ?></a></li>
<?}else {?>
<li><a class="ticket_status" href="tickets.php"><?= $trl->translate('TEXT_TICKETS_STATUS'); ?></a></li>
<?}?>
<li><a class="new_ticket" href="open.php"><?= $trl->translate('TEXT_NEW_TICKET'); ?></a></li>
<li><a class="home" href="index.php"><?= $trl->translate('TEXT_HOME'); ?></a></li>
<li><a class="log_out" href="logout.php"><?php echo $trl->translate('TEXT_LOG_OUT'); ?></a></li>
<?php }else {?>
<li><a class="ticket_status" href="tickets.php"><?php echo $trl->translate('TEXT_TICKETS_STATUS'); ?></a></li>
<?php }?>
<li><a class="new_ticket" href="open.php"><?php echo $trl->translate('TEXT_NEW_TICKET'); ?></a></li>
<li><a class="home" href="index.php"><?php echo $trl->translate('TEXT_HOME'); ?></a></li>
</ul>
<div id="content">
16 changes: 8 additions & 8 deletions include/client/login.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
$t=Format::input($_POST['lticket']?$_POST['lticket']:$_GET['t']);
?>
<div>
<?if($errors['err']) {?>
<p align="center" id="errormessage"><?=$errors['err']?></p>
<?}elseif($warn) {?>
<p class="warnmessage"><?=$warn?></p>
<?}?>
<?php if($errors['err']) {?>
<p align="center" id="errormessage"><?php echo $errors['err']?></p>
<?php }elseif($warn) {?>
<p class="warnmessage"><?php echo $warn?></p>
<?php }?>
</div>
<div style="margin:5px 0px 100px 0;text-align:center; width:100%;">
<p align="center"><?php echo $trl->translate('TEXT_LOGIN_VIEW_STATUS_OF_TICKET');?>;
</p>
<span class="error"><?=Format::htmlchars($loginmsg)?></span>
<span class="error"><?php echo Format::htmlchars($loginmsg)?></span>
<form action="login.php" method="post">
<table cellspacing="1" cellpadding="5" border="0" bgcolor="#000000" align="center">
<tr bgcolor="#EEEEEE">
<td><?php echo $trl->translate('LABEL_EMAIL'); ?>:</td><td><input type="text" name="lemail" size="25" value="<?=$e?>"></td>
<td><?php echo $trl->translate('LABEL_TICKET_ID')?>:</td><td><input type="text" name="lticket" size="10" value="<?=$t?>"></td>
<td><?php echo $trl->translate('LABEL_EMAIL'); ?>:</td><td><input type="text" name="lemail" size="25" value="<?php echo $e?>"></td>
<td><?php echo $trl->translate('LABEL_TICKET_ID')?>:</td><td><input type="text" name="lticket" size="10" value="<?php echo $t?>"></td>
<td><input class="button" type="submit" value="<?php echo $trl->translate('LABEL_VIEW_STATUS');?>"></td>
</tr>
</table>
Expand Down
46 changes: 23 additions & 23 deletions include/client/open.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,43 @@
$info=($_POST && $errors)?Format::input($_POST):($_GET ? Format::input($_GET) : array()); //on error...use the post data or use get data if available to prefill fields
?>
<div>
<?if($errors['err']) {?>
<?php if($errors['err']) {?>
<p align="center" id="errormessage"><?php echo $errors['err']?></p>
<?}elseif($msg) {?>
<?php }elseif($msg) {?>
<p align="center" id="infomessage"><?php echo $msg?></p>
<?}elseif($warn) {?>
<?php }elseif($warn) {?>
<p id="warnmessage"><?php echo $warn?></p>
<?}?>
<?php }?>
</div>
<div><?php echo $trl->translate('TEXT_PLEASE_FILL_FORM_NEW_TICKET')?></div><br>
<form action="open.php" method="POST" enctype="multipart/form-data">
<table align="left" cellpadding=2 cellspacing=1 width="90%">
<tr>
<th width="20%"><?php echo $trl->translate('LABEL_FULL_NAME')?>:</th>
<td>
<?if ($thisclient && ($name=$thisclient->getName())) {
<?php if ($thisclient && ($name=$thisclient->getName())) {
?>
<input type="hidden" name="name" value="<?php echo $name?>"><?php echo $name?>
<?}else {?>
<?php }else {?>
<input type="text" name="name" size="25" value="<?php echo $info['name']?>">
<?}?>
<?php }?>
&nbsp;<font class="error">*&nbsp;<?php echo $errors['name']?></font>
</td>
</tr>
<tr>
<th nowrap ><?php echo $trl->translate('LABEL_EMAIL_ADDRESS')?>:</th>
<td>
<?if ($thisclient && ($email=$thisclient->getEmail())) {
<?php if ($thisclient && ($email=$thisclient->getEmail())) {
?>
<input type="hidden" name="email" size="25" value="<?php echo $email?>"><?php echo $email?>
<?}else {?>
<?php }else {?>
<input type="text" name="email" size="25" value="<?php echo $info['email']?>">
<?}?>
<?php }?>
&nbsp;<font class="error">*&nbsp;<?php echo $errors['email']?></font>
<?if ($thisclient && ($name=$thisclient->getName())) { ?>
<?php if ($thisclient && ($name=$thisclient->getName())) { ?>
<br>
<A href="logout.php" ><?php echo $trl->translate('TEXT_NOT_THIS_USER')?></A>
<?}?>
<?php }?>
</td>
</tr>
<tr>
Expand All @@ -55,12 +55,12 @@
<td>
<select name="topicId">
<option value="" selected ><?php $trl->_('LABEL_SELECT_ONE_TOPIC') ?></option>
<?
<?php
$services= db_query('SELECT topic_id,topic FROM '.TOPIC_TABLE.' WHERE isactive=1 ORDER BY topic');
while (list($topicId,$topic) = db_fetch_row($services)){
$selected = ($info['topicId']==$topicId || $info['topic']==$topic)?'selected':''; ?>
<option value="<?php echo $topicId?>"<?php echo $selected?>><?php echo $topic?></option>
<?
<?php
}?>
<?php /*<option value="0" ><?php echo $trl->translate('TEXT_GENERAL_INQUIRY');?></option> */ ?>
</select>
Expand All @@ -77,29 +77,29 @@
<tr>
<th valign="top"><?php echo $trl->translate('LABEL_MESSAGE')?>:</th>
<td>
<? if($errors['message']) {?> <font class="error"><b>&nbsp;<?php echo $errors['message']?></b></font><br/><?}?>
<?php if($errors['message']) {?> <font class="error"><b>&nbsp;<?php echo $errors['message']?></b></font><br/><?php }?>
<textarea name="message" cols="35" rows="8" wrap="soft" style="width:85%"><?php echo $info['message']?></textarea></td>
</tr>
<?
<?php
if($cfg->allowPriorityChange() ) {
$sql='SELECT priority_id,priority_desc FROM '.TICKET_PRIORITY_TABLE.' WHERE ispublic=1 ORDER BY priority_urgency DESC';
if(($priorities=db_query($sql)) && db_num_rows($priorities)){ ?>
<tr>
<td><?php echo $trl->translate('LABEL_PRIORITY')?>:</td>
<td>
<select name="pri">
<?
<?php
$info['pri']=$info['pri']?$info['pri']:$cfg->getDefaultPriorityId(); //use system's default priority.
while($row=db_fetch_array($priorities)){ ?>
<option value="<?php echo $row['priority_id']?>" <?php echo $info['pri']==$row['priority_id']?'selected':''?> ><?php echo $row['priority_desc']?></option>
<?}?>
<?php }?>
</select>
</td>
</tr>
<? }
<?php }
}?>

<?if(($cfg->allowOnlineAttachments() && !$cfg->allowAttachmentsOnlogin())
<?php if(($cfg->allowOnlineAttachments() && !$cfg->allowAttachmentsOnlogin())
|| ($cfg->allowAttachmentsOnlogin() && ($thisclient && $thisclient->isValid()))){

?>
Expand All @@ -109,8 +109,8 @@
<input type="file" name="attachment"><font class="error">&nbsp;<?php echo $errors['attachment']?></font>
</td>
</tr>
<?}?>
<?if($cfg && $cfg->enableCaptcha() && (!$thisclient || !$thisclient->isValid())) {
<?php }?>
<?php if($cfg && $cfg->enableCaptcha() && (!$thisclient || !$thisclient->isValid())) {
if($_POST && $errors && !$errors['captcha'])
$errors['captcha']='Please re-enter the text again';
?>
Expand All @@ -121,7 +121,7 @@
<font class="error">&nbsp;<?php echo $errors['captcha']?></font>
</td>
</tr>
<?}?>
<?php }?>
<tr height=2px><td align="left" colspan=2 >&nbsp;</td></tr>
<tr>
<td></td>
Expand Down
28 changes: 14 additions & 14 deletions include/client/thankyou.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@
//Please customize the message below to fit your organization speak!
?>
<div>
<?if($errors['err']) {?>
<p align="center" id="errormessage"><?=$errors['err']?></p>
<?}elseif($msg) {?>
<p align="center" id="infomessage"><?=$msg?></p>
<?}elseif($warn) {?>
<p id="warnmessage"><?=$warn?></p>
<?}?>
<?php if($errors['err']) {?>
<p align="center" id="errormessage"><?php echo $errors['err']?></p>
<?php }elseif($msg) {?>
<p align="center" id="infomessage"><?php echo $msg?></p>
<?php }elseif($warn) {?>
<p id="warnmessage"><?php echo $warn?></p>
<?php }?>
</div>
<div style="margin:5px 100px 100px 0;">
<?=Format::htmlchars($ticket->getName())?>,<br>
<p><?=$trl->translate('TEXT_THANKS_NEW_TICKET')?></p>
<?php echo Format::htmlchars($ticket->getName())?>,<br>
<p><?php echo $trl->translate('TEXT_THANKS_NEW_TICKET')?></p>

<?if($cfg->autoRespONNewTicket()){ ?>
<p><?=$trl->translate('TEXT_NEW_TICKET_AUTO_RESPONSE',$ticket->getEmail())?>
<?php if($cfg->autoRespONNewTicket()){ ?>
<p><?php echo $trl->translate('TEXT_NEW_TICKET_AUTO_RESPONSE',$ticket->getEmail())?>
</p>
<?}?>
<p><?=$trl->translate('TEXT_SUPPORT_TEAM')?></p>
<?php }?>
<p><?php echo $trl->translate('TEXT_SUPPORT_TEAM')?></p>
</div>
<?
<?php
unset($_POST); //clear to avoid re-posting on back button??
?>
70 changes: 35 additions & 35 deletions include/client/tickets.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,22 @@
$negorder=$order=='DESC'?'ASC':'DESC'; //Negate the sorting..
?>
<div>
<?if($errors['err']) {?>
<p align="center" id="errormessage"><?=$errors['err']?></p>
<?}elseif($msg) {?>
<p align="center" id="infomessage"><?=$msg?></p>
<?}elseif($warn) {?>
<p id="warnmessage"><?=$warn?></p>
<?}?>
<?php if($errors['err']) {?>
<p align="center" id="errormessage"><?php echo $errors['err']?></p>
<?php }elseif($msg) {?>
<p align="center" id="infomessage"><?php echo $msg?></p>
<?php }elseif($warn) {?>
<p id="warnmessage"><?php echo $warn?></p>
<?php }?>
</div>
<div style="margin: 10px 0 60px 0;">
<table width="100%" border="0" cellspacing=0 cellpadding=0 align="center">
<tr>
<td width="60%" class="msg"><?=$showing?>&nbsp;&nbsp;<?=$results_type?></td>
<td width="60%" class="msg"><?php echo $showing?>&nbsp;&nbsp;<?php echo $results_type?></td>
<td nowrap >
<a href="view.php?status=open"><img src="images/view_open_btn.gif" alt="<?= $trl->translate('TEXT_VIEW_OPEN')?>" border=0></a>
<a href="view.php?status=closed"><img src="images/view_closed_btn.gif" alt="<?= $trl->translate('TEXT_VIEW_CLOSED')?>" border=0></a>
<a href=""><img src="<?php tei('IMAGE_STAFF_REFRESH')?>" alt="<?= $trl->translate('TEXT_REFRESH')?>" border=0></a>
<a href="view.php?status=open"><img src="images/view_open_btn.gif" alt="<?php echo $trl->translate('TEXT_VIEW_OPEN')?>" border=0></a>
<a href="view.php?status=closed"><img src="images/view_closed_btn.gif" alt="<?php echo $trl->translate('TEXT_VIEW_CLOSED')?>" border=0></a>
<a href=""><img src="<?php tei('IMAGE_STAFF_REFRESH')?>" alt="<?php echo $trl->translate('TEXT_REFRESH')?>" border=0></a>
</td>
</tr>
</table>
Expand All @@ -90,16 +90,16 @@
<table border="0" cellspacing=0 cellpadding=2 class="tgrid" align="center">
<tr>
<th width="70" nowrap>
<a href="view.php?sort=ID&order=<?=$negorder?><?=$qstr?>" title="<?= $trl->translate('TEXT_SORT_BY_TICKET_ID')?> <?=$negorder?>"><?= $trl->translate('LABEL_TICKET_NUMBER')?></a></th>
<a href="view.php?sort=ID&order=<?php echo $negorder?><?php echo $qstr?>" title="<?php echo $trl->translate('TEXT_SORT_BY_TICKET_ID')?> <?php echo $negorder?>"><?php echo $trl->translate('LABEL_TICKET_NUMBER')?></a></th>
<th width="100">
<a href="view.php?sort=date&order=<?=$negorder?><?=$qstr?>" title="<?= $trl->translate('TEXT_SORT_BY_DATE')?> <?=$negorder?>"><?= $trl->translate('LABEL_CREATE_DATE')?></a></th>
<th width="60"><?= $trl->translate('LABEL_TICKET_STATUS')?></th>
<th width="240"><?= $trl->translate('LABEL_SUBJECT')?></th>
<a href="view.php?sort=date&order=<?php echo $negorder?><?php echo $qstr?>" title="<?php echo $trl->translate('TEXT_SORT_BY_DATE')?> <?php echo $negorder?>"><?php echo $trl->translate('LABEL_CREATE_DATE')?></a></th>
<th width="60"><?php echo $trl->translate('LABEL_TICKET_STATUS')?></th>
<th width="240"><?php echo $trl->translate('LABEL_SUBJECT')?></th>
<th width="150">
<a href="view.php?sort=dept&order=<?=$negorder?><?=$qstr?>" title="<?= $trl->translate('TEXT_SORT_BY_DEPARTMENT')?> <?=$negorder?>"><?= $trl->translate('LABEL_DEPARTMENT')?></a></th>
<th width="150"><?= $trl->translate('LABEL_EMAIL')?></th>
<a href="view.php?sort=dept&order=<?php echo $negorder?><?php echo $qstr?>" title="<?php echo $trl->translate('TEXT_SORT_BY_DEPARTMENT')?> <?php echo $negorder?>"><?php echo $trl->translate('LABEL_DEPARTMENT')?></a></th>
<th width="150"><?php echo $trl->translate('LABEL_EMAIL')?></th>
</tr>
<?
<?php
$class = "row1";
$total=0;
if($tickets_res && ($num=db_num_rows($tickets_res))):
Expand All @@ -113,31 +113,31 @@
$ticketID="<b>$ticketID</b>";
}
?>
<tr class="<?=$class?> " id="<?=$row['ticketID']?>">
<td align="center" title="<?=$row['email']?>" nowrap>
<a class="Icon <?=strtolower($row['source'])?>Ticket" title="<?=$row['email']?>" href="view.php?id=<?=$row['ticketID']?>">
<?=$ticketID?></a></td>
<td nowrap>&nbsp;<?=Format::db_date($row['created'])?></td>
<td>&nbsp;<?=ucfirst($row['status'])?></td>
<td>&nbsp;<a href="view.php?id=<?=$row['ticketID']?>"><?=$subject?></a>
&nbsp;<?=$row['attachments']?"<span class='Icon file'>&nbsp;</span>":''?></td>
<td nowrap>&nbsp;<?=Format::truncate($dept,30)?></td>
<td>&nbsp;<?=Format::truncate($row['email'],40)?></td>
<tr class="<?php echo $class?> " id="<?php echo $row['ticketID']?>">
<td align="center" title="<?php echo $row['email']?>" nowrap>
<a class="Icon <?php echo strtolower($row['source'])?>Ticket" title="<?php echo $row['email']?>" href="view.php?id=<?php echo $row['ticketID']?>">
<?php echo $ticketID?></a></td>
<td nowrap>&nbsp;<?php echo Format::db_date($row['created'])?></td>
<td>&nbsp;<?php echo ucfirst($row['status'])?></td>
<td>&nbsp;<a href="view.php?id=<?php echo $row['ticketID']?>"><?php echo $subject?></a>
&nbsp;<?php echo $row['attachments']?"<span class='Icon file'>&nbsp;</span>":''?></td>
<td nowrap>&nbsp;<?php echo Format::truncate($dept,30)?></td>
<td>&nbsp;<?php echo Format::truncate($row['email'],40)?></td>
</tr>
<?
<?php
$class = ($class =='row2') ?'row1':'row2';
} //end of while.
else: //not tickets found!! ?>
<tr class="<?=$class?>"><td colspan=7><b><?= $trl->translate('TEXT_NO_TICKETS_FOUND')?></b></td></tr>
<?
<tr class="<?php echo $class?>"><td colspan=7><b><?php echo $trl->translate('TEXT_NO_TICKETS_FOUND')?></b></td></tr>
<?php
endif; ?>
</table>
</td></tr>
<tr><td>
<?
<?php
if($num>0 && $pageNav->getNumPages()>1){ //if we actually had any tickets returned?>
<tr><td style="text-align:left;padding-left:20px">page:<?=$pageNav->getPageLinks()?>&nbsp;</td></tr>
<?}?>
<tr><td style="text-align:left;padding-left:20px">page:<?php echo $pageNav->getPageLinks()?>&nbsp;</td></tr>
<?php }?>
</table>
</div>
<?
<?php
Loading

0 comments on commit c2f7f0e

Please sign in to comment.