Exemplo n.º 1
0
 function register()
 {
     global $CONFIG;
     $data['username'] = _p('email');
     $data['name'] = _p('name');
     $data['email'] = _p('email');
     $data['salt'] = 1234567890;
     if ($_POST['password'] != '') {
         $data['password'] = sha1(_P('password') . $data['salt']);
     }
     $getUser = $this->loginHelper->createUser($data);
     if ($getUser) {
         echo "<script>alert('Data anda akan segera di proses oleh admin');window.location.href='" . $CONFIG['admin']['base_url'] . "'</script>";
     }
     return false;
 }
Exemplo n.º 2
0
 function register()
 {
     global $CONFIG;
     $data['username'] = _p('username');
     $data['name'] = _p('name');
     $data['email'] = _p('email');
     $data['salt'] = 1234567890;
     $data['type'] = 3;
     $data['n_status'] = 1;
     if ($_POST['password'] != '') {
         $data['password'] = sha1(_P('password') . $data['salt']);
     }
     $getUser = $this->loginHelper->createUser($data);
     if ($getUser) {
         echo "<script>alert('Terima kasih sudah mendaftar');window.location.href='" . $CONFIG['admin']['base_url'] . "'</script>";
     }
     return false;
 }
Exemplo n.º 3
0
    <input type="text" name="q" size="20" value="<?php 
echo Format::htmlchars($_REQUEST['q']);
?>
">
    <select name="status">
        <option value="">&mdash; <?php 
echo __('Any Status');
?>
 &mdash;</option>
        <option value="open"
            <?php 
echo $status == 'open' ? 'selected="selected"' : '';
?>
>
            <?php 
echo _P('ticket-status', 'Open');
?>
 (<?php 
echo $thisclient->getNumOpenTickets();
?>
)</option>
        <?php 
if ($thisclient->getNumClosedTickets()) {
    ?>
        <option value="closed"
            <?php 
    echo $status == 'closed' ? 'selected="selected"' : '';
    ?>
>
            <?php 
    echo __('Closed');
Exemplo n.º 4
0
                        $errors['err'] = __('Unable to create the ticket. Correct the error(s) and try again');
                    }
                }
                break;
        }
    }
    if (!$errors) {
        $thisstaff->resetStats();
    }
    //We'll need to reflect any changes just made!
}
/*... Quick stats ...*/
$stats = $thisstaff->getTicketsStats();
//Navigation
$nav->setTabActive('tickets');
$open_name = _P('queue-name', 'Open');
if ($cfg->showAnsweredTickets()) {
    $nav->addSubMenu(array('desc' => $open_name . ' (' . number_format($stats['open'] + $stats['answered']) . ')', 'title' => __('Open Tickets'), 'href' => 'tickets.php?status=open', 'iconclass' => 'Ticket'), !$_REQUEST['status'] || $_REQUEST['status'] == 'open');
} else {
    if ($stats) {
        $nav->addSubMenu(array('desc' => $open_name . ' (' . number_format($stats['open']) . ')', 'title' => __('Open Tickets'), 'href' => 'tickets.php?status=open', 'iconclass' => 'Ticket'), !$_REQUEST['status'] || $_REQUEST['status'] == 'open');
    }
    if ($stats['answered']) {
        $nav->addSubMenu(array('desc' => __('Answered') . ' (' . number_format($stats['answered']) . ')', 'title' => __('Answered Tickets'), 'href' => 'tickets.php?status=answered', 'iconclass' => 'answeredTickets'), $_REQUEST['status'] == 'answered');
    }
}
if ($stats['assigned']) {
    $nav->addSubMenu(array('desc' => __('My Tickets') . ' (' . number_format($stats['assigned']) . ')', 'title' => __('Assigned Tickets'), 'href' => 'tickets.php?status=assigned', 'iconclass' => 'assignedTickets'), $_REQUEST['status'] == 'assigned');
}
if ($stats['overdue']) {
    $nav->addSubMenu(array('desc' => __('Overdue') . ' (' . number_format($stats['overdue']) . ')', 'title' => __('Stale Tickets'), 'href' => 'tickets.php?status=overdue', 'iconclass' => 'overdueTickets'), $_REQUEST['status'] == 'overdue');
Exemplo n.º 5
0
                    }
                }
                break;
        }
    }
    if(!$errors)
        $thisstaff ->resetStats(); //We'll need to reflect any changes just made!
endif;

/*... Quick stats ...*/
$stats= $thisstaff->getTicketsStats();

//Navigation
$nav->setTabActive('tickets');
$open_name = _P('queue-name',
    /* This is the name of the open ticket queue */
    'Open');
if($cfg->showAnsweredTickets()) {
    $nav->addSubMenu(array('desc'=>$open_name.' ('.number_format($stats['open']+$stats['answered']).')',
                            'title'=>__('Open Tickets'),
                            'href'=>'tickets.php?status=open',
                            'iconclass'=>'Ticket'),
                        (!$_REQUEST['status'] || $_REQUEST['status']=='open'));
} else {

    if ($stats) {

        $nav->addSubMenu(array('desc'=>$open_name.' ('.number_format($stats['open']).')',
                               'title'=>__('Open Tickets'),
                               'href'=>'tickets.php?status=open',
                               'iconclass'=>'Ticket'),
Exemplo n.º 6
0
 static function getVerb($state)
 {
     if (isset(static::$_states[$state])) {
         return _P('ticket state action', static::$_states[$state]['verb']);
     }
     if (isset(static::$_privatestates[$state])) {
         return _P('ticket state action', static::$_privatestates[$state]['verb']);
     }
 }
Exemplo n.º 7
0
echo __('Optional internal note (recommended on assignment)');
?>
"
                    data-draft-namespace="ticket.staff.note" name="note"
                    cols="21" rows="6" style="width:80%;"
                    ><?php 
echo $info['note'];
?>
</textarea>
            </td>
        </tr>
    </tbody>
</table>
<p style="text-align:center;">
    <input type="submit" name="submit" value="<?php 
echo _P('action-button', 'Open');
?>
" id="open">
    <input type="reset"  name="reset"  value="<?php 
echo __('Reset');
?>
">
    <input type="button" name="cancel" value="<?php 
echo __('Cancel');
?>
" onclick="javascript:
        $('.richtext').each(function() {
            var redactor = $(this).data('redactor');
            if (redactor && redactor.opts.draftDelete)
                redactor.deleteDraft();
        });
echo 'echo $translator->setLanguage("fr")' . "\n";
$translator->setLanguage("fr");
?>
    </pre>

<p>Below are the results of each tests above using 'fr' language:</p>
    <pre class="code" data-language="php">
<?php 
echo '=> ' . _T('test', null, 'fr');
echo "\n";
echo "\n";
echo '=> ' . _T('test_args', array('arg1' => 'AZERTY', 'arg2' => 4.657), 'fr');
echo "\n";
$indexes = array(0 => 'test_item_zero', 1 => 'test_item_one', 2 => 'test_item_two', 3 => 'test_item_multi');
for ($counter = 0; $counter < 5; $counter++) {
    echo "\n" . 'for counter=' . $counter . ' : ' . _P($indexes, $counter, null, 'fr');
}
echo "\n";
echo "\n";
echo '=> ' . _D($date, null, 'UTF-8', 'fr');
echo "\n";
echo "\n";
echo '=> ' . _N($nb, 'fr');
echo "\n";
echo "\n";
echo '=> ' . _C($nb, 'fr');
echo "\n";
echo "\n";
echo 'echo $translator->getCurrency("fr")' . "\n";
echo '=> ' . $translator->getCurrency('fr') . "\n";
echo 'echo $translator->getLanguageCode("fr")' . "\n";
Exemplo n.º 9
0
                <font class="error">&nbsp;<?php echo $errors['note']; ?></font></em>
            </th>
        </tr>
        <tr>
            <td colspan=2>
                <textarea class="richtext ifhtml draft draft-delete"
                    placeholder="<?php echo __('Optional internal note (recommended on assignment)'); ?>"
                    data-draft-namespace="ticket.staff.note" name="note"
                    cols="21" rows="6" style="width:80%;"
                    ><?php echo $info['note']; ?></textarea>
            </td>
        </tr>
    </tbody>
</table>
<p style="text-align:center;">
    <input type="submit" name="submit" value="<?php echo _P('action-button', 'Open');?>">
    <input type="reset"  name="reset"  value="<?php echo __('Reset');?>">
    <input type="button" name="cancel" value="<?php echo __('Cancel');?>" onclick="javascript:
        $('.richtext').each(function() {
            var redactor = $(this).data('redactor');
            if (redactor && redactor.opts.draftDelete)
                redactor.deleteDraft();
        });
        window.location.href='tickets.php';
    ">
</p>
</form>
<script type="text/javascript">
$(function() {
    $('input#user-email').typeahead({
        source: function (typeahead, query) {
Exemplo n.º 10
0
 public function edit()
 {
     global $CONFIG;
     $id = $_GET['id'];
     if ($_POST == null) {
         $data = $this->contentHelper->selectuser($id);
         if ($data) {
             if ($data['hp']) {
                 $data['hp'] = unserialize($data['hp']);
             }
             $this->view->assign('data', $data);
         }
         return $this->loadView($this->folder . "edit_user");
     } else {
         $name = $_POST['name'];
         $username = $_POST['username'];
         //$password = $_POST['password'];
         $email = $_POST['email'];
         $hp = serialize(array('phone' => $_POST['phone'], 'mobilephone' => $_POST['mobilephone']));
         $hak_akses = $_POST['role'];
         $n_status = $_POST['status'];
         $institusi = $_POST['perusahaan'];
         $alamat = $_POST['address'];
         $image = $_POST['photo'];
         $salt = 1234567890;
         if ($_POST['password'] != '') {
             $password = sha1(_P('password') . $salt);
         }
         $update = $this->contentHelper->updateuser($id, $name, $username, $password, $email, $hp, $hak_akses, $n_status, $institusi, $alamat, $image, $salt);
         //pr($data);
         if ($update == 1) {
             echo "<script>alert('Data berhasil di simpan');window.location.href='" . $CONFIG['admin']['base_url'] . "user'</script>";
         }
     }
 }