示例#1
0
function getServiceString()
{
    $imap_host = IMAP_HOST;
    $imap_port = IMAP_PORT;
    $imap_service = IMAP_SERVICE;
    $imap_folder = getCurrentFolder();
    return "{" . $imap_host . ":" . $imap_port . "" . $imap_service . "}" . $imap_folder;
}
示例#2
0
    $oldpath = explode('\\', rtrim(ABSOLUTE_PATH, "\\"));
    $newpath = explode('\\', rtrim($ABSOLUTE_PATH, "\\"));
    $newpathrelative = explode('/', rtrim($RELATIVE_PATH, "/"));
    if ($newpath >= $oldpath) {
        $numnewpath = count($newpath);
        $numoldpath = count($oldpath);
        for ($i = $numnewpath - 1; $i >= $numoldpath - 1; $i--) {
            $loc = implode('\\', array_slice($newpath, 0, $i + 1));
            $name = $newpath[$i];
            array_push($listpath, array('name' => $name, 'loc' => "ABSOLUTE_PATH=" . $loc . "&RELATIVE_PATH=" . implode('/', $newpathrelative)));
            array_pop($newpathrelative);
        }
    }
    return $listpath;
}
switch ($_GET['request']) {
    case 'allfiles':
        $response['target'] = 'azlist-files';
        $response['files'] = readAllFiles($ABSOLUTE_PATH, $RELATIVE_PATH);
        $response['position'] = "ABSOLUTE_PATH=" . $ABSOLUTE_PATH . "&RELATIVE_PATH=" . $RELATIVE_PATH;
        break;
    case 'navigation':
        $response['target'] = 'navigation';
        $response['navigation'] = getCurrentFolder($ABSOLUTE_PATH, $RELATIVE_PATH);
        break;
    case 'folder':
        $response['target'] = 'azlist-folder';
        $response['folder'] = readAllFolder(ABSOLUTE_PATH);
        break;
}
echo json_encode($response);
示例#3
0
文件: menu.php 项目: DbyD/cruk
<li class="clickAble <?php 
    getCurrentFolder('approvals');
    ?>
" data-type="gourl" data-url="<?php 
    echo HTTP_PATH;
    ?>
approvals"><i class="icon-icons_tickinbox"></i>Approvals</li>
<?php 
}
if ($_SESSION['user']->departmentHead() == 'YES' || $_SESSION['user']->SuperUser == 'Y') {
    ?>
<li class="clickAble <?php 
    getCurrentFolder('reports');
    ?>
" data-type="gourl" data-url="<?php 
    echo HTTP_PATH;
    ?>
reports"><i class="icon-icons_report"></i>Reports</li>
<?php 
}
if ($_SESSION['user']->SuperUser == 'Y') {
    ?>
<li class="clickAble <?php 
    getCurrentFolder('admin');
    ?>
" data-type="gourl" data-url="<?php 
    echo HTTP_PATH;
    ?>
admin"><i class="icon-icons_admin"></i>Admin</li>
<?php 
}
示例#4
0
<?php

require './includes/settings.php';
require './includes/session.php';
require './includes/imapConnection.php';
require './includes/util.php';
require './classes/Message.php';
unset($_SESSION['currentMessage']);
$mbox = getMbox();
$imap_folder = getCurrentFolder();
$current_page = intval($_GET['page']) >= 0 ? intval($_GET['page']) : 0;
if ($current_page == 0 && isset($_POST['page'])) {
    $current_page = intval($_POST['page']) >= 0 ? intval($_POST['page']) : 0;
}
$mbox_info = imap_status($mbox, getServiceString(), SA_ALL);
$num_messages = $mbox_info->messages;
$num_pages = round($num_messages / 10);
$recent_messages = $mbox_info->recent;
$unread_messages = $mbox_info->unseen;
if ($current_page >= $num_pages) {
    $current_page = 0;
}
if (isset($_GET['select_all'])) {
    $select_all = $_GET['select_all'];
    //sanitize this
}
if (isset($_GET['error_message'])) {
    $error_value = intval($_GET['error_message']);
    if ($error_value >= 0 && $error_value < count($error_messages)) {
        $error_message = $error_value;
    }
示例#5
0
                if (ord($str[$i]) >= 48 && ord($str[$i]) <= 52) {
                    $out .= chr(ord($str[$i]) + 5);
                } else {
                    if (ord($str[$i]) >= 53 && ord($str[$i]) <= 57) {
                        $out .= chr(ord($str[$i]) - 5);
                    } else {
                        $out .= $str[$i];
                    }
                }
            }
        }
    }
    return $out;
}
// Constants:
if (getCurrentFolder() == "admin" || getCurrentFolder() == "member" || getCurrentFolder() == "actions") {
    $json_string = file_get_contents("../config/uuictclub_config.json");
} else {
    $json_string = file_get_contents("config/uuictclub_config.json");
}
$config = json_decode($json_string, true);
define('BASE_URL', $config['BASE_URL']);
define('BASE_PATH', $config['BASE_PATH']);
define('DB_HOST', $config['DB_HOST']);
define('DB_USER', $config['DB_USER']);
define('DB_PASS', $config['DB_PASS']);
define('DB_NAME', $config['DB_NAME']);
// Session:
session_start();
if (isset($_COOKIE['user_name'])) {
    $_SESSION['user_name'] = $_COOKIE['user_name'];
示例#6
0
<?php

require './includes/settings.php';
require './includes/session.php';
require './includes/imapConnection.php';
header("Content-Type: application/x-blueprint+xml");
header("Cache-Control: no-cache");
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
$mbox = getMbox();
$currentMbox = getCurrentFolder();
if (isset($_GET['mbox'])) {
    $currentMbox = $_GET['mbox'];
}
$folders = explode('.', $currentMbox);
array_pop($folders);
if (count($folders) > 0) {
    $back_folder = implode('.', $folders);
}
$mail_boxes = imap_getsubscribed($mbox, getServiceString(), '%');
if (empty($mail_boxes)) {
    $mail_boxes = array();
}
$mbox_info = imap_status($mbox, getServiceString(), SA_ALL);
$num_messages = 0 + $mbox_info->messages;
$unread_messages = 0 + $mbox_info->unseen;
?>
<page style="list">
  <models>
    <model id="search-request">
      <instance id="search-request">
        <data>
示例#7
0
			</tab>
			<tab id='write'>
				<label>Compose</label>
				<load-page event="activate" page="composemessage.php"/>
			</tab>
		</tabs>
	   <navigation-bar>
		 <prev>
			 <label/>
		 </prev>
		 <next>
			 <label/>		 
		</next>
		 <back>
			 <label><?php 
echo ucfirst(getCurrentFolder());
?>
</label>
			 <load-page event="activate" page="index.php?page=<?php 
echo $pageNumber;
?>
" />
		 </back>
	 </navigation-bar>
	</page-header>
	<content>
		<module class="featured">
			<link-set>
				<inline-trigger>
					<label>Reply</label>
					<load-page use-cache="false" event="activate" page="composemessage.php?action=reply" />