Skip to content
Snippets Groups Projects
Commit a4ac1647 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge branch 'develop' into feature/discard-warning

parents 630b87e8 a3e65233
Branches
Tags
No related merge requests found
...@@ -126,14 +126,98 @@ class TicketsAjaxAPI extends AjaxController { ...@@ -126,14 +126,98 @@ class TicketsAjaxAPI extends AjaxController {
global $thisstaff; global $thisstaff;
if(!$thisstaff || !($ticket=Ticket::lookup($tid)) || !$ticket->checkStaffAccess($thisstaff))
Http::response(404, 'No such ticket');
$ticket = new Ticket($tid); $staff=$ticket->getStaff();
$lock=$ticket->getLock();
$error=$msg=$warn=null;
$resp = sprintf( if($lock && $lock->getStaffId()==$thisstaff->getId())
'<div style="width:500px;"> $warn.='&nbsp;<span class="Icon lockedTicket">Ticket is locked by '.$lock->getStaffName().'</span>';
<strong>Ticket #%d Preview</strong><br>INFO HERE!!', elseif($ticket->isOverdue())
$ticket->getExtId()); $warn.='&nbsp;<span class="Icon overdueTicket">Marked overdue!</span>';
ob_start();
echo sprintf(
'<div style="width:500px; padding: 2px 2px 0 5px;">
<h2>%s</h2><br>',Format::htmlchars($ticket->getSubject()));
if($error)
echo sprintf('<div id="msg_error">%s</div>',$error);
elseif($msg)
echo sprintf('<div id="msg_notice">%s</div>',$msg);
elseif($warn)
echo sprintf('<div id="msg_warning">%s</div>',$warn);
echo '<table border="0" cellspacing="" cellpadding="1" width="100%" class="ticket_info">';
$ticket_state=sprintf('<span>%s</span>',ucfirst($ticket->getStatus()));
if($ticket->isOpen()) {
if($ticket->isOverdue())
$ticket_state.=' &mdash; <span>Overdue</span>';
else
$ticket_state.=sprintf(' &mdash; <span>%s</span>',$ticket->getPriority());
}
echo sprintf('
<tr>
<th width="100">Ticket State:</th>
<td>%s</td>
</tr>
<tr>
<th>Create Date:</th>
<td>%s</td>
</tr>',$ticket_state,
Format::db_datetime($ticket->getCreateDate()));
if($ticket->isClosed()) {
echo sprintf('
<tr>
<th>Close Date:</th>
<td>%s <span class="faded">by %s</span></td>
</tr>',
Format::db_datetime($ticket->getCloseDate()),
($staff?$staff->getName():'staff')
);
} elseif($ticket->getDueDate()) {
echo sprintf('
<tr>
<th>Due Date:</th>
<td>%s</td>
</tr>',
Format::db_datetime($ticket->getDueDate()));
}
echo '</table>';
echo '<hr>
<table border="0" cellspacing="" cellpadding="1" width="100%" class="ticket_info">';
if($ticket->isOpen()) {
echo sprintf('
<tr>
<th width="100">Assigned To:</th>
<td>%s</td>
</tr>',$ticket->isAssigned()?$ticket->getAssignee():' <span class="faded">&mdash; Unassigned &mdash;</span>');
}
echo sprintf(
' <tr>
<th width="100">Department:</th>
<td>%s</td>
</tr>
<tr>
<th>Help Topic:</th>
<td>%s</td>
</tr>
<tr>
<th>From:</th>
<td>%s <span class="faded">%s</span></td>
</tr>',
Format::htmlchars($ticket->getDeptName()),
Format::htmlchars($ticket->getHelpTopic()),
Format::htmlchars($ticket->getName()),
$ticket->getEmail());
echo '
</table>';
$options[]=array('action'=>'Thread ('.$ticket->getThreadCount().')','url'=>"tickets.php?id=$tid"); $options[]=array('action'=>'Thread ('.$ticket->getThreadCount().')','url'=>"tickets.php?id=$tid");
if($ticket->getNumNotes()) if($ticket->getNumNotes())
$options[]=array('action'=>'Notes ('.$ticket->getNumNotes().')','url'=>"tickets.php?id=$tid#notes"); $options[]=array('action'=>'Notes ('.$ticket->getNumNotes().')','url'=>"tickets.php?id=$tid#notes");
...@@ -150,15 +234,15 @@ class TicketsAjaxAPI extends AjaxController { ...@@ -150,15 +234,15 @@ class TicketsAjaxAPI extends AjaxController {
$options[]=array('action'=>'Post Note','url'=>"tickets.php?id=$tid#note"); $options[]=array('action'=>'Post Note','url'=>"tickets.php?id=$tid#note");
if($options) { if($options) {
$resp.='<ul class="tip_menu">'; echo '<ul class="tip_menu">';
foreach($options as $option) { foreach($options as $option)
$resp.=sprintf('<li><a href="%s">%s</a></li>', echo sprintf('<li><a href="%s">%s</a></li>',$option['url'],$option['action']);
$option['url'],$option['action']); echo '</ul>';
}
$resp.='</ul>';
} }
$resp.='</div>'; echo '</div>';
$resp = ob_get_contents();
ob_end_clean();
return $resp; return $resp;
} }
......
<?php defined('OSTSCPINC') or die('Invalid path'); ?> <?php defined('OSTSCPINC') or die('Invalid path'); ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>osTicket:: SCP Login</title> <title>osTicket:: SCP Login</title>
<link rel="stylesheet" href="css/login.css" type="text/css" /> <link rel="stylesheet" href="css/login.css" type="text/css" />
<meta name="robots" content="noindex" /> <meta name="robots" content="noindex" />
<meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" /> <meta http-equiv="pragma" content="no-cache" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
</head> </head>
<body id="loginBody"> <body id="loginBody">
<div id="loginBox"> <div id="loginBox">
<h1 id="logo"><a href="index.php">osTicket Staff Control Panel</a></h1> <h1 id="logo"><a href="index.php">osTicket Staff Control Panel</a></h1>
<h1><?php echo Format::htmlchars($msg); ?></h1> <h3><?php echo Format::htmlchars($msg); ?></h3>
<br /> <form action="login.php" method="post">
<form action="login.php" method="post"> <input type="hidden" name="d"o value="scplogin">
<input type="hidden" name=do value="scplogin" /> <fieldset>
<table border=0 align="center"> <input type="text" name="username" id="name" value="" placeholder="username" autocorrect="off" autocapitalize="off">
<tr><td width=100px align="right"><b>Username</b>:</td><td><input type="text" name="username" id="name" value="" /></td></tr> <input type="password" name="passwd" id="pass" placeholder="password" autocorrect="off" autocapitalize="off">
<tr><td align="right"><b>Password</b>:</td><td><input type="password" name="passwd" id="pass" /></td></tr> </fieldset>
<tr><td>&nbsp;</td><td>&nbsp;&nbsp;<input class="submit" type="submit" name="submit" value="Login" /></td></tr> <input class="submit" type="submit" name="submit" value="Log In">
</table> </form>
</form>
</div> </div>
<div id="copyRights">Copyright &copy; <a href='http://www.osticket.com' target="_blank">osTicket.com</a></div> <div id="copyRights">Copyright &copy; <a href='http://www.osticket.com' target="_blank">osTicket.com</a></div>
</body> </body>
......
* {
box-sizing: border-box;
position: relative;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
*:focus {
outline-color: rgb(207,16,118);
outline-style: auto;
outline-width: 5px;
z-index:1000;
}
:-webkit-input-placeholder {
color:#888;
font-style:italic;
}
:-moz-placeholder {
color:#888;
font-style:italic;
}
html {
height:100%;
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
body { body {
background:url(/images/bg.gif) #fff; -webkit-font-smoothing:antialiased;
font-family:arial, helvetica, sans-serif; background:url(../images/login-background.jpg) top left repeat-x #fff;
font-size:10pt; font-size: 16px;
color:#000; font-smoothing:antialiased;
} height:100%;
body#loginBody { line-height: 1.5em;
text-align: center; margin: 0;
margin: 100px; text-align: center;
}
h1#logo {
float: none;
width: 190px;
height: 60px;
padding:10px 0 20px 0;
background: url(../images/logo-support.gif) center center no-repeat #fff;
margin: 0 auto 0 auto;
}
h1#logo a, h1#logo a:link, h1#logo a:visited, h1#logo a:hover {
display: block;
width: 190px;
height: 60px;
text-indent: -999em;
text-decoration: none;
background: none;
margin:0 auto 0 auto;
}
input:focus, textarea:focus {
color: #F70;
background: #FEA;
-moz-outline-style: none;
}
input[type="hidden"] { border: 0; }
.submit {
font-family: Arial, Helvetica, sans-serif;
margin:10px auto 10px auto;
text-shadow: #333 -1px -1px 0px;
background-color: #DB8606;
color: #FFF;
border:1px solid #666;
font-weight:bold;
width:auto;
} }
input[type="submit"]:focus { body, input {
border: 1px solid #E50; font-family: helvetica, arial, sans-serif;
border-right-color: #FBA; font-size: 100%/1.5;
border-bottom-color: #FBA; color: #000;
background: #F70;
color: #FEA;
} }
h1 { font-size: 0.9em; color: #F70; margin: 0; text-align: center;} input[type=reset], input[type=submit], input[type=button] {
display: inline-block;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-moz-tap-highlight-color: rgba(0, 0, 0, 0);
-o-tap-highlight-color: rgba(0, 0, 0, 0);
tap-highlight-color: rgba(0, 0, 0, 0);
}
#loginBox {
border:1px solid #2a67ac;
border-right:2px solid #2a67ac;
border-bottom:3px solid #2a67ac;
background:#fff;
width:400px;
margin:10% auto 0 auto;
padding:1em;
text-align:center;
}
div#loginBox { h1 {
width: 300px; margin:0;
padding: 10px 20px 5px 20px;
margin: 0 auto 0 auto;
background: #fff;
text-align: center;
border:5px solid #ddd;
} }
div#copyRights {
font-size: 0.8em; #logo a {
text-align: center; display:block;
color:#666; width:180px;
height:72px;
text-decoration:none;
text-indent:-9999px;
background:url(../images/login-logo.png);
margin:0 auto 1em auto;
} }
#copyRights a, #copyRights a:link, #copyRights a:visited, #copyRights a:hover { h3 {
margin:1em 0;
text-align:center;
font-size:0.8em;
font-weight:normal;
color:#d00;
}
text-decoration: none; form {
background: none; width:220px;
color:#666; margin:0 auto;
overflow:hidden;
} }
fieldset {
border:none;
margin:0;
padding:0;
}
input { fieldset input {
width: 175px; display:block;
margin-left: 5px width:100%;
margin-bottom:1em;
border:1px solid #ccc;
background:#fff;
padding:2px;
} }
input[type="submit"] { width: auto; margin:10px auto 10px auto; }
input.submit {
display:inline-block;
float:right;
margin:0;
height:24px;
line-height:24px;
font-weight:bold;
border:1px solid #666666;
padding:0 10px;
background: url('../images/grey_btn_bg.png?1312910883') top left repeat-x;
color: #333;
}
table,form { margin-top:2px; padding: 0; } input.submit:hover, input.submit:active {
background-position:bottom left;
}
#copyRights {
font-size:0.7em;
color:#888;
padding:1em;
text-align:center;
}
#copyRights a {
color:#888;
}
...@@ -926,6 +926,16 @@ h2 .reload { ...@@ -926,6 +926,16 @@ h2 .reload {
width:300px; width:300px;
} }
.tip_content hr {
color: #ddd;
background-color: #ddd;
height: 1px;
border: 0;
padding: 0;
width: 100%;
}
.tip_close { .tip_close {
position:absolute; position:absolute;
left:100%; left:100%;
...@@ -950,7 +960,7 @@ h2 .reload { ...@@ -950,7 +960,7 @@ h2 .reload {
.tip_menu { .tip_menu {
margin:10px 0 0 0; margin:10px 0 0 0;
padding:5px 0; padding:5px 0;
border-top:1px solid #ddd; border-top:1px solid #666;
height:16px; height:16px;
font-size:9pt; font-size:9pt;
} }
......
scp/images/grey_btn_bg.png

3.03 KiB

scp/images/login-background.jpg

20.8 KiB

scp/images/login-logo.png

11.4 KiB

<!DOCTYPE html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head> <head>
<title><?php echo $wizard['title']; ?></title> <title><?php echo $wizard['title']; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/wizard.css"> <link rel="stylesheet" href="css/wizard.css">
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script> <script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/tips.js"></script> <script type="text/javascript" src="js/tips.js"></script>
......
<?php <?php
if(!defined('SETUPINC')) die('Kwaheri!'); if(!defined('SETUPINC')) die('Kwaheri!');
$info=($_POST && $errors)?Format::htmlchars($_POST):array('prefix'=>'ost_','dbhost'=>'localhost'); $info=($_POST && $errors)?Format::htmlchars($_POST):array('prefix'=>'ost_','dbhost'=>'localhost');
//XXX: Remove b4 release.
if($_SESSION['installer']['info'] && !$_POST)
$info=$_SESSION['installer']['info'];
?> ?>
<div id="main" class="step2"> <div id="main" class="step2">
<h1>osTicket Basic Installation</h1> <h1>osTicket Basic Installation</h1>
......
<?php <?php
if(!defined('SETUPINC')) die('Kwaheri!'); if(!defined('SETUPINC')) die('Kwaheri!');
$msg = $_SESSION['upgrader']['msg']; $msg = $_SESSION['ost_upgrader']['msg'];
?> ?>
<div id="main"> <div id="main">
<h1>Attachments Migration</h1> <h1>Attachments Migration</h1>
......
...@@ -29,11 +29,11 @@ $wizard['menu']=array('Installation Guide'=>'http://osticket.com/wiki/Installati ...@@ -29,11 +29,11 @@ $wizard['menu']=array('Installation Guide'=>'http://osticket.com/wiki/Installati
if($_POST && $_POST['s']) { if($_POST && $_POST['s']) {
$errors = array(); $errors = array();
$_SESSION['installer']['s']=$_POST['s']; $_SESSION['ost_installer']['s']=$_POST['s'];
switch(strtolower($_POST['s'])) { switch(strtolower($_POST['s'])) {
case 'prereq': case 'prereq':
if($installer->check_prereq()) if($installer->check_prereq())
$_SESSION['installer']['s']='config'; $_SESSION['ost_installer']['s']='config';
else else
$errors['prereq']='Minimum requirements not met!'; $errors['prereq']='Minimum requirements not met!';
break; break;
...@@ -43,7 +43,7 @@ if($_POST && $_POST['s']) { ...@@ -43,7 +43,7 @@ if($_POST && $_POST['s']) {
elseif(!$installer->config_writable()) elseif(!$installer->config_writable())
$errors['err']='Write access required to continue'; $errors['err']='Write access required to continue';
else else
$_SESSION['installer']['s']='install'; $_SESSION['ost_installer']['s']='install';
break; break;
case 'install': case 'install':
if($installer->install($_POST)) { if($installer->install($_POST)) {
...@@ -51,7 +51,7 @@ if($_POST && $_POST['s']) { ...@@ -51,7 +51,7 @@ if($_POST && $_POST['s']) {
'email' =>$_POST['admin_email'], 'email' =>$_POST['admin_email'],
'URL'=>URL); 'URL'=>URL);
//TODO: Go to subscribe step. //TODO: Go to subscribe step.
$_SESSION['installer']['s']='done'; $_SESSION['ost_installer']['s']='done';
} elseif(!($errors=$installer->getErrors()) || !$errors['err']) { } elseif(!($errors=$installer->getErrors()) || !$errors['err']) {
$errors['err']='Error installing osTicket - correct the errors below and try again.'; $errors['err']='Error installing osTicket - correct the errors below and try again.';
} }
...@@ -69,16 +69,16 @@ if($_POST && $_POST['s']) { ...@@ -69,16 +69,16 @@ if($_POST && $_POST['s']) {
$errors['notify'] = 'Check one or more'; $errors['notify'] = 'Check one or more';
if(!$errors) if(!$errors)
$_SESSION['installer']['s'] = 'done'; $_SESSION['ost_installer']['s'] = 'done';
break; break;
} }
}elseif($_GET['s'] && $_GET['s']=='ns' && $_SESSION['installer']['s']=='subscribe') { }elseif($_GET['s'] && $_GET['s']=='ns' && $_SESSION['ost_installer']['s']=='subscribe') {
$_SESSION['installer']['s']='done'; $_SESSION['ost_installer']['s']='done';
} }
switch(strtolower($_SESSION['installer']['s'])) { switch(strtolower($_SESSION['ost_installer']['s'])) {
case 'config': case 'config':
case 'install': case 'install':
if(!$installer->config_exists()) { if(!$installer->config_exists()) {
......
...@@ -15,13 +15,21 @@ ...@@ -15,13 +15,21 @@
**********************************************************************/ **********************************************************************/
#inits #inits
error_reporting(E_ALL ^ E_NOTICE); //turn on errors error_reporting(E_ALL ^ E_NOTICE); //turn on errors??
ini_set('magic_quotes_gpc', 0); ini_set('magic_quotes_gpc', 0);
ini_set('session.use_trans_sid', 0); ini_set('session.use_trans_sid', 0);
ini_set('session.cache_limiter', 'nocache'); ini_set('session.cache_limiter', 'nocache');
ini_set('display_errors',1); //We want the user to see errors during install process. ini_set('display_errors',1); //We want the user to see errors during install process.
ini_set('display_startup_errors',1); ini_set('display_startup_errors',1);
#Disable Globals if enabled
if(ini_get('register_globals')) {
ini_set('register_globals',0);
foreach($_REQUEST as $key=>$val)
if(isset($$key))
unset($$key);
}
#start session #start session
session_start(); session_start();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment