Пример #1
0
 function log($id)
 {
     if ($id && ($log = Log::lookup($id))) {
         $content = sprintf('<div style="width:500px;">&nbsp;<strong>%s</strong><br><p>%s</p>
                 <hr><strong>Log Date:</strong> <em>%s</em> <strong>IP Address:</strong> <em>%s</em></div>', $log->getTitle(), Format::display(str_replace(',', ', ', $log->getText())), Format::db_daydatetime($log->getCreateDate()), $log->getIP());
     } else {
         $content = '<div style="width:295px;">&nbsp;<strong>Error:</strong>Unknown or invalid log ID</div>';
     }
     return $content;
 }
Пример #2
0
 function log($id)
 {
     if ($id && ($log = Log::lookup($id))) {
         $content = sprintf('<div
                 style="width:500px;">&nbsp;<strong>%s</strong><br><p
                 style="white-space:pre-line;">%s</p>
                 <hr><strong>%s:</strong> <em>%s</em> <strong>%s:</strong> <em>%s</em></div>', $log->getTitle(), Format::display(str_replace(',', ', ', $log->getText())), __('Log Date'), Format::db_daydatetime($log->getCreateDate()), __('IP Address'), $log->getIP());
     } else {
         $content = '<div style="width:295px;">&nbsp;<strong>' . __('Error') . ':</strong>' . sprintf(__('%s: Unknown or invalid ID.'), __('log entry')) . '</div>';
     }
     return $content;
 }
Пример #3
0
</th></tr>
                    <?php 
        if ($resp_row['attachments'] > 0) {
            ?>
                    <tr class="header">
                        <td><?php 
            echo $ticket->getAttachmentStr($respID, 'R');
            ?>
</td></tr>
                                    
                    <?php 
        }
        ?>
			        <tr class="info">
				        <td> <?php 
        echo Format::display($resp_row['response']);
        ?>
</td></tr>
		        </table>
		    <?php 
    }
    //endwhile...response loop.
    $msgid = $msg_row['msg_id'];
}
//message loop.
?>
    </div>
</div>
<div>
    <div align="center">
        <?php 
Пример #4
0
$passwd = Format::input($_POST['lpasswd'] ?: $_GET['t']);
$content = Page::lookup(Page::getIdByType('banner-client'));
if ($content) {
    list($title, $body) = $ost->replaceTemplateVariables(array($content->getName(), $content->getBody()));
} else {
    $title = 'Sign In';
    $body = 'To better serve you, we encourage our clients to register for
        an account and verify the email address we have on record.';
}
?>
<h1><?php 
echo Format::display($title);
?>
</h1>
<p><?php 
echo Format::display($body);
?>
</p>
<form action="login.php" method="post" id="clientLogin">
    <?php 
csrf_token();
?>
<div style="display:table-row">
    <div style="width:40%;display:table-cell;box-shadow: 12px 0 15px -15px rgba(0,0,0,0.4);padding:15px;">
    <strong><?php 
echo Format::htmlchars($errors['login']);
?>
</strong>
    <div>
        <input id="username" placeholder="Email or Username" type="text" name="luser" size="30" value="<?php 
echo $email;
Пример #5
0
 function display()
 {
     return Format::display($this->body);
 }
Пример #6
0
    <strong><?php 
echo $category->getName();
?>
</strong>
    <span>(<?php 
echo $category->isPublic() ? 'Public' : 'Internal';
?>
)</span>
    <time>Last updated <?php 
echo Format::db_date($category->getUpdateDate());
?>
</time>
</div>
<div class="cat-desc">
<?php 
echo Format::display($category->getDescription());
?>
</div>
<?php 
if ($thisstaff->canManageFAQ()) {
    echo sprintf('<div class="cat-manage-bar"><a href="categories.php?id=%d" class="Icon editCategory">Edit Category</a>
             <a href="categories.php" class="Icon deleteCategory">Delete Category</a>
             <a href="faq.php?cid=%d&a=add" class="Icon newFAQ">Add New FAQ</a></div>', $category->getId(), $category->getId());
} else {
    ?>
<hr>
<?php 
}
$sql = 'SELECT faq.faq_id, question, ispublished, count(attach.file_id) as attachments ' . ' FROM ' . FAQ_TABLE . ' faq ' . ' LEFT JOIN ' . ATTACHMENT_TABLE . ' attach
         ON(attach.object_id=faq.faq_id AND attach.type=\'F\' AND attach.inline = 0) ' . ' WHERE faq.category_id=' . db_input($category->getId()) . ' GROUP BY faq.faq_id ORDER BY question';
if (($res = db_query($sql)) && db_num_rows($res)) {
Пример #7
0
                
            <?php
            
            } ?>
            
        </table>
        <?php
        if($message['responses'] && ($responses=$ticket->getResponses($message['msg_id']))) {
           foreach($responses as $resp) {
               $staff=$cfg->hideStaffName()?'staff':Format::htmlchars($resp['staff_name']);
               ?>
               <table class="response" cellspacing="0" cellpadding="1" width="100%" border="0">
                <tr>
                    <th><?php echo Format::db_datetime($resp['created']);?>&nbsp;-&nbsp;<?php echo $staff; ?></th>
                </tr>
                <tr><td><?php echo Format::display($resp['response']); ?></td></tr>
                <?php
                if($resp['attachments'] && ($links=$ticket->getAttachmentsLinks($resp['response_id'],'R'))) {?>
                 <tr><td class="info"><?php echo $links; ?></td></tr>
                <?php
                 }?>
                </table>
            <?
           }
       }
    }
}
?>
</div>
<div class="clear" style="padding-bottom:10px;"></div>
<?php if($errors['err']) { ?>
Пример #8
0
    $notes = explode('. ', $notes);
    $notes = $notes[0];
    ?><tr><td colspan="2">
    <a href="#ajax.php/content/<?php echo $id; ?>/manage"
    onclick="javascript:
        $.dialog($(this).attr('href').substr(1), 201);
    return false;" class="pull-left"><i class="icon-file-text icon-2x"
        style="color:#bbb;"></i> </a>
    <span style="display:inline-block;width:90%;padding-left:10px;line-height:1.2em">
    <a href="#ajax.php/content/<?php echo $id; ?>/manage"
    onclick="javascript:
        $.dialog($(this).attr('href').substr(1), 201);
    return false;"><?php
    echo Format::htmlchars($title); ?></a><br/>
    <span class="faded"><?php
        echo Format::display($notes); ?>
    <em>(<?php echo sprintf(__('Last Updated %s'), Format::db_datetime($upd));
        ?>)</em></span></span></td></tr><?php
}; ?>
        <tr>
            <th colspan="2">
                <em><b><?php echo __(
                'Authentication and Registration Templates'); ?></b></em>
            </th>
        </tr>
        <?php $manage_content(__('Agents'), 'pwreset-staff'); ?>
        <?php $manage_content(__('Clients'), 'pwreset-client'); ?>
        <?php $manage_content(__('Guest Ticket Access'), 'access-link'); ?>
        <tr>
            <th colspan="2">
                <em><b><?php echo __('Sign In Pages'); ?></b></em>
Пример #9
0
<?php

include_once INCLUDE_DIR . 'staff/login.header.php';
$info = $_POST && $errors ? Format::htmlchars($_POST) : array();
?>
<div id="loginBox">
    <h1 id="logo"><a href="index.php">osTicket Staff Control Panel</a></h1>
    <h3><?php 
echo Format::htmlchars($msg);
?>
</h3>
    <div class="banner"><small><?php 
echo $content ? Format::display($content->getBody()) : '';
?>
</small></div>
    <form action="login.php" method="post">
        <?php 
csrf_token();
?>
        <input type="hidden" name="do" value="scplogin">
        <fieldset>
            <input type="text" name="userid" id="name" value="<?php 
echo $info['userid'];
?>
" placeholder="username" autocorrect="off" autocapitalize="off">
            <input type="password" name="passwd" id="pass" placeholder="password" autocorrect="off" autocapitalize="off">
            <?php 
if ($show_reset && $cfg->allowPasswordReset()) {
    ?>
            <h3 style="display:inline"><a href="pwreset.php">Forgot my password</a></h3>
            <?php 
Пример #10
0
</span>
                  &nbsp;&nbsp;
                  <span class="Icon <?php 
        echo $icon;
        ?>
"><?php 
        echo Format::htmlchars($row['title']);
        ?>
</span></a>
                    <div id="msg_<?php 
        echo $row['log_id'];
        ?>
" class="hide">
                        <hr>
                        <?php 
        echo Format::display($row['log']);
        ?>
                        <span style="text-align:right;float:right;"><i><?php 
        echo Format::htmlchars($row['ip_address']);
        ?>
&nbsp;&nbsp;</i></span>
                    </div>

                </td>
            </tr>
            <?php 
        $class = $class == 'row2' ? 'row1' : 'row2';
    }
    //end of while.
} else {
    //not tickets found!!
            //get answers for messages
            $sql='SELECT resp.*,count(attach_id) as attachments FROM '.TICKET_RESPONSE_TABLE.' resp '.
                ' LEFT JOIN '.TICKET_ATTACHMENT_TABLE." attach ON  resp.ticket_id=attach.ticket_id AND resp.response_id=attach.ref_id AND ref_type='R' ".
                ' WHERE msg_id='.db_input($msg_row['msg_id']).' AND resp.ticket_id='.db_input($id).
                ' GROUP BY resp.response_id ORDER BY created';
		    $resp =db_query($sql);
		    while ($resp_row = db_fetch_array($resp)) {
                $respID=$resp_row['response_id'];
                ?>
    		    <table align="center" class="response" cellspacing="0" cellpadding="1" width="100%" border=0>
    		        <tr><th><?=Format::db_daydatetime($resp_row['created'])?>&nbsp;-&nbsp;<?=$resp_row['staff_name']?></th></tr>
                    <?if($resp_row['attachments']>0){ ?>
                    <tr class="header">
                        <td><?=$ticket->getAttachmentStr($respID,'R')?></td></tr>
                    <?}?>
			        <tr><td> <?=Format::display($resp_row['response'])?></td></tr>
		        </table>
	        <?}
            $msgid =$msg_row['msg_id'];
	    }?>
    </div>
</div>
<table align="center" cellspacing="0" cellpadding="3" width="90%" border=0>
  <?if($_POST['a']!='process') {?>
  <tr> <td align="center">
     <?if($errors['err']) {?>
        <p align="center" id="errormessage"><?=$errors['err']?></p>
    <?}elseif($msg) {?>
        <p align="center" id="infomessage"><?=$msg?></p>
    <?}?> 
  </td></tr>
 function display($output = false)
 {
     if ($this->isEmpty()) {
         return '(empty)';
     }
     switch ($output) {
         case 'email':
             return $this->body;
         case 'pdf':
             return Format::clickableurls($this->body, false);
         default:
             return Format::display($this->body);
     }
 }
Пример #13
0
            <tr>
                <th width="200"><?php 
        echo Format::db_datetime($entry['created']);
        ?>
</th>
                <th width="440"><span><?php 
        echo Format::htmlchars($entry['title']);
        ?>
</span></th>
                <th width="300" class="tmeta"><?php 
        echo Format::htmlchars($entry['poster']);
        ?>
</th>
            </tr>
            <tr><td colspan=3><?php 
        echo Format::display($entry['body']);
        ?>
</td></tr>
            <?php 
        if ($entry['attachments'] && ($links = $ticket->getAttachmentsLinks($entry['id'], $entry['thread_type']))) {
            ?>
            <tr>
                <td class="info" colspan=3><?php 
            echo $links;
            ?>
</td>
            </tr>
            <?php 
        }
        ?>
        </table>
        //get answers for messages
        $respID = $resp_row['response_id'];
        $name = $cfg->hideStaffName() ? 'staff' : Format::htmlchars($msg_row['staff_name']);
        ?>
        <div class="responselabel">
            <span class="Icon inMessage">&nbsp;<?php 
        echo Format::db_daydatetime($msg_row['created']);
        ?>
&nbsp;-&nbsp;<?php 
        echo $name;
        ?>
</span>
            </div>
            <div class="message">
                  <?php 
        echo Format::display($msg_row['message']);
        ?>
        </div>
            <div class="attachment">
                <?php 
        if ($msg_row['attachments'] > 0) {
            ?>
                  <?php 
            echo $ticket->getAttachmentStr($msg_row['msg_id'], 'R');
            ?>
                <?php 
        }
        ?>
        </div>
    <?php 
    }
Пример #15
0
<?php
include_once(INCLUDE_DIR.'staff/login.header.php');
$info = ($_POST && $errors)?Format::htmlchars($_POST):array();
?>
<div id="loginBox">
    <h1 id="logo"><a href="index.php">osTicket Staff Control Panel</a></h1>
    <h3><?php echo Format::htmlchars($msg); ?></h3>
    <div class="banner"><small><?php echo ($content) ? Format::display($content->getBody()) : ''; ?></small></div>
    <form action="login.php" method="post">
        <?php csrf_token(); ?>
        <input type="hidden" name="do" value="scplogin">
        <fieldset>
            <input type="text" name="userid" id="name" value="<?php echo $info['userid']; ?>" placeholder="Staff Login" autocorrect="off" autocapitalize="off">
            <input type="password" name="passwd" id="pass" placeholder="Password" autocorrect="off" autocapitalize="off">
            <?php if ($show_reset && $cfg->allowPasswordReset()) { ?>
            <h3 style="display:inline"><a href="pwreset.php">Forgot my password</a></h3>
            <?php } ?>
            <input class="submit" type="submit" name="submit" value="Log In">
        </fieldset>
    </form>
<?php
$ext_bks = array();
foreach (StaffAuthenticationBackend::allRegistered() as $bk)
    if ($bk instanceof ExternalAuthentication)
        $ext_bks[] = $bk;

if (count($ext_bks)) { ?>
<div class="or">
    <hr/>
</div><?php
    foreach ($ext_bks as $bk) { ?>