Esempio n. 1
0
 public function index()
 {
     $this->load->model("access_manager_model");
     $this->load->model("user_manager_model");
     $this->load->model("module_manager_model");
     $this->lang->load('ae_access', $this->selected_lang);
     $this->data['message'] = get_message();
     $this->data['users_info'] = $this->user_manager_model->get_all_users_info();
     $this->data['modules_info'] = $this->module_manager_model->get_all_modules_info($this->selected_lang);
     if ($this->input->post()) {
         $this->lang->load('error', $this->selected_lang);
         if ($this->input->post('post_type') === "user_access") {
             $this->change_user_access();
         }
         if ($this->input->post('post_type') === "module_access") {
             $this->change_module_access();
         }
     }
     $this->data['selected_user_id'] = $this->session->flashdata('selected_user_id');
     $this->data['selected_module_id'] = $this->session->flashdata('selected_module_id');
     $this->data['access_info'] = array();
     foreach ($this->data['users_info'] as $user) {
         $user_id = $user['user_id'];
         $modules = $this->access_manager_model->get_user_modules($user_id);
         foreach ($modules as $module) {
             $this->data['access_info'][$user_id][$module] = 1;
         }
     }
     $this->data['lang_pages'] = get_lang_pages(get_link("admin_access", TRUE));
     $this->data['header_title'] = $this->lang->line("access_levels");
     $this->send_admin_output("access");
     return;
 }
Esempio n. 2
0
 public function index()
 {
     $this->data['message'] = get_message();
     $this->lang->load('ce_home', $this->selected_lang);
     $this->data['lang_pages'] = get_lang_pages(get_link("home_url", TRUE));
     $this->data['header_title'] .= $this->lang->line("header_title");
     $this->data['header_meta_description'] .= $this->lang->line("header_meta_description");
     $this->data['header_meta_keywords'] .= $this->lang->line("header_meta_keywords");
     $this->data['header_canonical_url'] = get_link("home_url");
     $this->send_customer_output("home");
     return;
 }
function get_all_javascript_messages()
{
    $js_messages = '    <script type="text/javascript">' . PHP_EOL;
    $js_messages .= '    var messages = new Object()' . PHP_EOL;
    $js_messages .= '    messages[\'Record\']=\'' . get_message('Record<br>audio') . '\';' . PHP_EOL;
    $js_messages .= '    messages[\'Rerecord\']=\'' . get_message('Re-record<br>audio') . '\';' . PHP_EOL;
    $js_messages .= '    messages[\'You are doing task \']=\'' . get_message('You are doing task ') . '\';' . PHP_EOL;
    $js_messages .= '    messages[\'Log out after...\']=\'' . get_message('Log out after the upload has finished and fill the feedback form!') . '\';' . PHP_EOL;
    $js_messages .= '    messages[\'Thats it\']=\'' . get_message('That\'s it! Thanks for your support!') . '\';' . PHP_EOL;
    $js_messages .= '    messages[\'Stop<br>and upload\']=\'' . get_message('Stop<br>and upload') . '\';' . PHP_EOL;
    $js_messages .= '    messages[\'Listen\']=\'' . get_message('Listen') . '\';' . PHP_EOL;
    $js_messages .= '    messages[\'Stop\']=\'' . get_message('Stop') . '\';' . PHP_EOL;
    $js_messages .= '</script>' . PHP_EOL;
    return $js_messages;
}
Esempio n. 4
0
 public function index()
 {
     $this->lang->load('ae_constant', $this->selected_lang);
     if ($this->input->post()) {
         if ($this->input->post("post_type") === "constants_list") {
             return $this->modify_constants();
         }
         if ($this->input->post("post_type") === "add_constant") {
             return $this->add_constant();
         }
     }
     $this->data['message'] = get_message();
     $this->data['constants'] = $this->constant_manager_model->get_all();
     $this->data['lang_pages'] = get_lang_pages(get_link("admin_constant", TRUE));
     $this->data['header_title'] = $this->lang->line("constants");
     $this->send_admin_output("constant");
     return;
 }
Esempio n. 5
0
 function get_account()
 {
     if ($_POST && isset($_POST['retrieve']) && $_POST['retrieve'] == 'password') {
         $this->form_validation->set_rules('username', 'Username', 'required');
     } elseif ($_POST && isset($_POST['retrieve']) && $_POST['retrieve'] == 'username') {
         $this->form_validation->set_rules('email', 'Email', 'required');
     }
     $this->form_validation->set_rules('retrieve', 'Account', 'required');
     $this->form_validation->set_error_delimiters('<span class="error error_span">', '</span>');
     if ($this->form_validation->run() == FALSE) {
         $this->load->view('retrieve-account');
     } else {
         if ($user = $this->Customer_model->retrieve_account($this->input->post())) {
             if ($email = get_message('forget-password')) {
                 if ($this->session->userdata('language') == 'french') {
                     $message = $email->message_text_fr;
                     $title = $email->message_title_fr;
                 } else {
                     $message = $email->message_text;
                     $title = $email->message_title;
                 }
                 $message = str_replace('{FIRSTNAME}', $user->user_firstname, $message);
                 $message = str_replace('{LASTNAME}', $user->user_lastname, $message);
                 $message = str_replace('{USERNAME}', $user->user_name, $message);
                 $message = str_replace('{PASSWORD}', $user->user_password, $message);
                 $message = str_replace("\n", '<br/>', $message);
                 $this->load->library('email');
                 $email_config['mailtype'] = 'html';
                 $email_config['protocol'] = 'mail';
                 $this->email->initialize($email_config);
                 $this->email->from('*****@*****.**', '1-800-Flowers');
                 $this->email->to($user->user_email);
                 $this->email->subject($title);
                 $this->email->message($message);
                 $this->email->send();
                 $this->load->view('password-sent');
             }
         } else {
             $data['message'] = 'Sorry this account does not exists!';
             $this->load->view('retrieve-account', $data);
         }
     }
 }
Esempio n. 6
0
 public function __construct()
 {
     try {
         parent::__construct();
         $this->data['title'] = addslashes(t("Generate MVC"));
         //Browser Title
         //Define Errors Here//
         $this->cls_msg = array();
         $this->cls_msg["no_result"] = get_message('no_result');
         $this->cls_msg["save_err"] = get_message('save_failed');
         $this->cls_msg["save_succ"] = get_message('save_success');
         $this->cls_msg["delete_err"] = get_message('del_failed');
         $this->cls_msg["delete_succ"] = get_message('del_success');
         //end Define Errors Here//
         $this->pathtoclass = admin_base_url() . $this->router->fetch_class() . "/";
         $this->load->helper('basic_text_template');
         $this->data['BREADCRUMB'] = array(addslashes(t('Generate MVC Depending on Database Table')));
     } catch (Exception $err_obj) {
         show_error($err_obj->getMessage());
     }
 }
Esempio n. 7
0
 public function __construct()
 {
     try {
         parent::__construct();
         $this->data['title'] = addslashes(t("Generate MVC"));
         //Browser Title
         //Define Errors Here//
         $this->cls_msg = array();
         $this->cls_msg["no_result"] = get_message('no_result');
         $this->cls_msg["save_err"] = get_message('save_failed');
         $this->cls_msg["save_succ"] = get_message('save_success');
         $this->cls_msg["delete_err"] = get_message('del_failed');
         $this->cls_msg["delete_succ"] = get_message('del_success');
         //end Define Errors Here//
         $this->pathtoclass = admin_base_url() . $this->router->fetch_class() . "/";
         $this->load->helper('basic_text_template');
         $this->data['BREADCRUMB'] = array(addslashes(t('Generate MVC Depending on Database Table')));
         $this->form_field_type = array('text' => 'Text', 'password' => 'Password', 'textarea' => 'Textarea', 'select' => 'Drop Down', 'radio' => 'Radio', 'checkbox' => 'Checkbox', 'file' => 'File Upload');
         $this->data['form_field_type'] = $this->form_field_type;
         $this->tbl_prefix = $this->db->tableprefix;
     } catch (Exception $err_obj) {
         show_error($err_obj->getMessage());
     }
 }
        $wechat = $_POST['wechat'];
        $blog = $_POST['blog'];
        $github = $_POST['github'];
        //$native = "西安";
        $native = null;
        $grade = trim($grade);
        $workplace = trim($workplace);
        $userObj = new UserClass();
        print $userObj->update_userinfo($uid, $phone, $mail, $qq, $wechat, $blog, $github, $native, $major, $workplace, $job);
        exit;
    case 'refresh_activity':
        $mid = $_POST['mid'];
        $uid = $_POST['uid'];
        $result = "";
        for ($i = 0; $i < 5; ++$i) {
            $b = get_message($uid, $mid, $i);
            if ($b == 'false') {
                if ($result == "") {
                    $result = 'false';
                }
                break;
            }
            $result .= $b;
        }
        print $result;
        exit;
    default:
        return;
}
function get_message($uid, $mid, $start)
{
Esempio n. 9
0
<?php

$login_message = null;
if (!isset($_SESSION['username'])) {
    /* Password checking implementation left outside the project    */
    /* for obvious security reasons (i.e. I'm not good in this so   */
    /* I'd rather not publicly display specific vulnerabilities.    */
    /* passwords.php must include a function "check_password"       */
    /* that takes a username and password and returns true or false */
    require 'passwords.php';
    if (isset($_POST['username'])) {
        if (isset($_POST['password'])) {
            $user = check_password($_POST['username'], $_POST['password'], $db);
            if ($user) {
                $name = $user['username'];
                $_SESSION['user'] = $user;
                $_SESSION['username'] = $name;
                $_SESSION['userclass'] = $user['class'];
                $login_message = get_message('Successful login') . "<b>" . $name . "</b>. <a href=logout.php>" . get_message('Log out here.') . "</a>";
            } else {
                $login_message = get_message('Unsuccessful login');
            }
        }
    }
} else {
    $user = $_SESSION['user'];
    $name = $_SESSION['username'];
    $login_message = get_message('You\'re logged in as ') . "<b>" . $name . "</b>. <a href=logout.php>" . get_message('Log out here.') . "</a>";
}
function show_message($type, $message)
{
    echo get_message($type, $message);
    flush();
}
Esempio n. 11
0
/*
 * logout.php
 * 
 * Copyright 2015 Álvaro Castillo <*****@*****.**>
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301, USA.
 * 
 * 
 */
require_once __DIR__ . "/../../session.php";
require_once __DIR__ . "/../../moneyio.php";
open_session();
if (empty($_SESSION) && isset($_SESSION)) {
    echo get_message("logout_not_done");
} else {
    close_session();
    echo get_message("logout");
}
Esempio n. 12
0
$form_hidden = array(sha1("editcurriculumtype") => sha1(random_string("alnum", 5)));
echo form_open("dashboard/curriculums/settings/types/" . ($curriculumtypeinfo ? $curriculumtypeinfo->getCurriculumtypeid() : 0) . "/edit", $form_attr, $form_hidden);
?>
				
					<div class="form-group <?php 
echo has_error("curriculumType") ? "has-error" : (has_success("curriculumType") ? "has-success" : "");
?>
">
						<label for="curriculumTypeinput" class="col-sm-4 control-label">Curriculum type</label>
						<div class="col-sm-8">
							<input name="curriculumType" type="text" id="curriculumTypeinput" class="form-control" value="<?php 
echo set_value("curriculumType", $curriculumtypeinfo ? $curriculumtypeinfo->curriculum_type : "");
?>
" />
							<?php 
echo has_message("curriculumType") ? '<span class="help-block">' . get_message("curriculumType") . '</span>' : "";
?>
						</div>
					</div>
					
					<div class="form-group">
						<div class="col-sm-8 col-sm-offset-4">
							<button name="saveUpdatecurriculumtype" type="submit" class="btn btn-primary"> Save </button>
							<a href="<?php 
echo site_url("dashboard/curriculums/settings/types");
?>
" id="cancelUpdatecurriculumtype" class="btn btn-danger rounded-corners-4px"> Cancel </a>
						<div>
					</div>
				</form>
			</div>
Esempio n. 13
0
				<p><h3>Nombre</h3> <strong><?php 
    echo $user_info->name;
    ?>
</strong></p>
				<p><h3>Apellidos</h3> <strong><?php 
    echo $user_info->surname;
    ?>
</strong></p>
				<p><h3>Acerca de mí</h3> <strong><?php 
    echo $user_info->aboutme;
    ?>
</strong></p>
				<p><h3>Número de teléfono</h3><strong> <?php 
    echo $user_info->phone_number;
    ?>
</strong></p>
			</div>
			
			<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
				<img id="default-profile-img" src="../../mio-frontend/images/<?php 
    echo $picture;
    ?>
" class="img-responsive img-circle">
			</div>
		</div>
	</div>

<?php 
} else {
    echo get_message("no_session");
}
Esempio n. 14
0
							<?php 
$username = array('name' => 'usernamefield', 'value' => set_value("usernamefield"), 'class' => 'text-center form-control', 'placeholder' => 'Username');
echo form_input($username);
?>
							
							<span class=" input-group-btn form-field-clear-btn-group"  id="username-field-clear-btn-group" >
								<button disabled  data-target="username"  id="username-field-clear-btn"  class="form-field-clear-btn btn  btn-default" type="button">
									<i class="fa fa-times text-danger"></i> 
								</button>
							 </span>
						</div>
						<span id="usernamefield-help-block"  class="margin-bottom-0 padding-left-50 <?php 
echo has_message("usernamefield") ? "" : "sr-only";
?>
 help-block"> <i class="  fa fa-exclamation-circle"></i> <span id="usernamefield-message"><?php 
echo has_message("usernamefield") ? get_message("usernamefield") : "";
?>
</span></span>
						
					</div>
					<hr class="margin-top-0 margin-left-15  margin-right-15">
					<div class="margin-bottom-0 form-group form-field-form-group  <?php 
echo has_error("passwordfield") ? "has-error" : (has_success("passwordfield") ? "has-success" : "");
?>
"  id="password-field-form-group">
						<div class="input-group">
							<span class="input-group-btn">
								<button id="password-field-btn"  class="form-field-btn btn  <?php 
echo has_error("passwordfield") ? "btn-danger" : (has_success("passwordfield") ? "btn-success" : "btn-default");
?>
" type="button" onclick="this.form.passwordfield.select();">
Esempio n. 15
0
							<input value="<?php 
echo has_value("cssubjectUnit") ? get_value("cssubjectUnit") : set_value("cssubjectUnit", 0);
?>
" type="text" class="form-control" name="cssubjectUnit" id="subjectUnitinput"  data-max="10" data-min="0" data-step="1" data-rule="quantity" />

							<span class="input-group-addon add-on"> 
								<a href="#" class="spin-up" data-spin="up">
									<span class="glyphicon glyphicon-triangle-top icon-sort-up"></span>
								</a> 
								<a href="#" class="spin-down" data-spin="down">
									<span class="glyphicon glyphicon-triangle-bottom icon-sort-down"></span>
								</a>
							</span>
						</div>
						<span class="help-block"><?php 
echo has_message("cssubjectUnit") ? get_message("cssubjectUnit") : "";
?>
</span>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-3 col-sm-offset-4">
						<button type="submit" class="btn btn-primary form-control"> Save  </button>
					</div>
					<div class="col-sm-3">
						<a href="<?php 
echo site_url("dashboard/curriculums/" . ($curriculuminfo ? $curriculuminfo->getCurriculumid() : 0) . "/subjects/add");
?>
" class="rounded-corners-4px btn btn-danger form-control"> Reset  </a>
					</div>
				</div>
Esempio n. 16
0
<?php

// generic database query wrapper
function query_wrapper($query)
{
    $r = mysql_query($query) or trigger_error(mysql_error(), E_USER_ERROR);
    return $r;
}
// fetch message based on a numeric identifier
function get_message($id)
{
    $result = query_wrapper("SELECT * FROM msg WHERE id=" . $id);
    return fetch_object_wrapper($result);
}
// main code
// Use pecl/filter to avoid sql injection here
$message = get_message($_GET['id']);
<?php

if ($_REQUEST['message'] != "") {
    $message = $_REQUEST['message'];
} else {
    $message = $_SESSION['message'];
}
include_once "includes/messages.php";
if ($message == "") {
    print "<p class='cross'>No Message</p>";
} else {
    if (isset($_REQUEST['msgboxval'])) {
        print get_message($message, $_REQUEST['msgboxval']);
    } else {
        print get_message($message);
    }
}
Esempio n. 18
0
$queue_name = "test_queue_name";
include __DIR__ . '/../lib/IronWorkerWrapper.php';
$name = "sampleWorker.php";
$start = get_time();
for ($i = 1; $i <= 10; $i++) {
    queue_worker($iw, $name);
}
$worker_time = get_time() - $start;
$start = get_time();
for ($i = 1; $i <= 10; $i++) {
    post_message($ironmq, $queue_name);
}
$sent_time = get_time() - $start;
$start = get_time();
for ($i = 1; $i <= 10; $i++) {
    get_message($ironmq, $queue_name);
}
$received_time = get_time() - $start;
$details = array("worker" => $worker_time, "sent" => $sent_time, "received" => $received_time);
echo json_encode($details);
function get_time()
{
    return (double) array_sum(explode(' ', microtime()));
}
function get_message($ironmq, $queue_name)
{
    $ironmq->getMessage($queue_name);
}
function post_message($ironmq, $queue_name)
{
    $ironmq->postMessage($queue_name, array("body" => "body"));
?>
		</div>
		
		<div class="col-sm-8 col-md-9">
		
			<div class="page-header">
	
				<h1><?php 
echo $template->page_title;
?>
</h1>
				
			</div>
	
			<?php 
get_message();
?>
		
			<div class="row dashboard-links">
				<div class="col-lg-3 col-md-4 col-xs-6">
					<a class="thumbnail" href="<?php 
$app->url;
?>
?area=locations">
						<i class="fa fa-globe"></i>
						<h4>Locations</h4>
					</a>
				</div>
				<div class="col-lg-3 col-md-4 col-xs-6">
					<a class="thumbnail" href="<?php 
$app->url;
Esempio n. 20
0
echo has_message("yearlevelAlias") ? '<span class="help-block">' . get_message("yearlevelAlias") . '</span>' : "";
?>
						</div>
					</div>
					<div class="form-group <?php 
echo has_error("yearlevelDescription") ? "has-error" : (has_success("yearlevelDescription") ? "has-success" : "");
?>
">
						<label for="yearlevelDescriptioninput" class="col-sm-4 control-label">Year level Description</label>
						<div class="col-sm-8">
							<input name="yearlevelDescription" type="text" id="yearlevelDescriptioninput" class="form-control" value="<?php 
echo set_value("yearlevelDescription", $yearlevelinfo ? $yearlevelinfo->yearlevel_description : "");
?>
" />
							<?php 
echo has_message("yearlevelDescription") ? '<span class="help-block">' . get_message("yearlevelDescription") . '</span>' : "";
?>
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-8 col-sm-offset-4">
							<button name="saveUpdateyearlevel" type="submit" class="btn btn-primary"> Save </button>
							<a href="<?php 
echo site_url("dashboard/curriculums/settings/yearlevels");
?>
" id="cancelUpdateyearelevel" class="btn btn-danger"> Cancel </a>
						<div>
					</div>
				</form>
			</div>
		</div>
Esempio n. 21
0
         $mail->SMTPAuth = true;
         $mail->SMTPSecure = 'ssl';
         $mail->Port = 587;
         $mail->Host = 'mail.infomaniak.ch';
         if ($row_config_globale['smtp_auth']) {
             $mail->SMTPAuth = true;
             $mail->Username = $row_config_globale['smtp_login'];
             $mail->Password = $row_config_globale['smtp_pass'];
         }
         break;
     default:
         break;
 }
 $mail->Sender = $newsletter['from_addr'];
 $mail->SetFrom($newsletter['from_addr'], $newsletter['from_name']);
 $msg = get_message($cnx, $row_config_globale['table_archives'], $msg_id);
 $format = $msg['type'];
 $list_pj = $cnx->query("SELECT * FROM " . $row_config_globale['table_upload'] . " WHERE list_id={$list_id} AND msg_id={$msg_id} ORDER BY id ASC")->fetchAll(PDO::FETCH_ASSOC);
 if (count($list_pj) > 0) {
     foreach ($list_pj as $item) {
         $mail->AddAttachment('upload/' . $item['name']);
     }
 }
 $subject = stripslashes($msg['subject']);
 if ($format == "html") {
     $mail->IsHTML(true);
 }
 $mail->WordWrap = 70;
 if (file_exists("DKIM/DKIM_config.php") && ($row_config_globale['sending_method'] == 'smtp' || $row_config_globale['sending_method'] == 'php_mail')) {
     include "DKIM/DKIM_config.php";
     $mail->DKIM_domain = $DKIM_domain;
Esempio n. 22
0
                        <li><a href="<?php 
echo base_url('buy');
?>
">BUY</a></li>
                        <li><a href="<?php 
echo base_url('job/browse');
?>
">SELL</a></li>
                        <li><a href="<?php 
echo base_url('job/post');
?>
" class="btn btn-default color-black">POST JOB</a></li> 
                        <li> 
                            <?php 
$this->load->helper('notification');
$html = get_message();
$total = !empty($html['total']) ? '(' . $html['total'] . ')' : '';
?>
                            <a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> Message <?php 
echo $total;
?>
</a>
                            <ul class="dropdown-menu notification_ul" style="width:350px">
                                <?php 
echo $html['html'];
?>
                            </ul>
                        </li>
                         <li> 
                            <a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                <span class="glyphicon glyphicon-bell" style="color:white" aria-hidden="true"></span>
Esempio n. 23
0
require 'conf.php';
// Expire session in so-and-so-many minutes:
// From http://stackoverflow.com/questions/520237/how-do-i-expire-a-php-session-after-30-minutes
if (isset($_SESSION['LAST_ACTIVITY']) && time() - $_SESSION['LAST_ACTIVITY'] > $conf['session_expiration_time']) {
    // last request was more than 30 minutes ago
    session_unset();
    // unset $_SESSION variable for the run-time
    session_destroy();
    // destroy session data in storage
}
$_SESSION['LAST_ACTIVITY'] = time();
// update last activity time stamp
require 'php/get_messages.php';
// auth.php checks password and gives the $name variable
require 'php/auth.php';
// Headers ie. styles etc:
// require('php/header.php');
//echo '<body>'.PHP_EOL;
$pageTitle = get_message("Speech corpus collector -- ") . $conf['pagetitle'];
if (isset($name)) {
    /*require('php/help_bar.php');*/
    //  echo "<div id=loginmessage>$login_message</div>";
    require 'php/recording_html.php';
} else {
    $teacherlogin = "******" . get_message('Login for teachers') . "</a>";
    /* authentication has not been performed */
    /* so let's do it here */
    // require('php/auth_form.php');
}
//require('php/footer.php');
require './templates/index.jade.php';
Esempio n. 24
0
<div class="container">
  <div id="fullscreen_bg" class="fullscreen_bg"/>

  <div class="container">
	


  <?php 
echo form_open_multipart(base_url('login_check'), array('class' => 'form-signin'));
?>
		<h1 class="form-signin-heading text-muted">管理员登陆</h1>
		<?php 
if (isset($message)) {
    ?>
		<div class="alert alert-danger" role="alert"><?php 
    echo get_message();
    ?>
</div>
		<?php 
}
?>
		<input type="text" class="form-control" name="username" placeholder="管理员账号"  autofocus required>
		<input type="password" class="form-control" name="password" placeholder="管理员密码" required>

		<button class="btn btn-lg btn-primary btn-block" type="submit" name="login">
		登陆系统
		</button>
	</form>

</div>
</div>
Esempio n. 25
0
echo $yend;
?>
" data-step="1" data-rule="Year" />

									<span class="input-group-addon add-on"> 
										<a href="#" class="spin-up" data-spin="up">
											<span class="glyphicon glyphicon-triangle-top icon-sort-up"></span>
										</a> 
										<a href="#" class="spin-down" data-spin="down">
											<span class="glyphicon glyphicon-triangle-bottom icon-sort-down"></span>
										</a>
									</span>
								</div>
						    	 <?php 
if (has_message("curriculumYear")) {
    echo '<span class="help-block">' . get_message("curriculumYear") . '</span>';
}
?>
						    </div>
						</div>
					</fieldset>
				</div>
			</div>
			<div class="form-group">
			    <div class="text-center col-md-2 col-md-offset-5">
			      	<button id="saveCurriculumbtn" type="submit" class="btn btn-primary form-control ">Save</button>
			    </div>
			     
			    <div class="text-center col-md-2">
			    	<div id="resetCurriculumbtncontainer" class="<?php 
echo hide_this("resetCurriculumbtn");
Esempio n. 26
0
function print_message_review_form($bapi, $session_id, $reqinfo)
{
    $req_id = $reqinfo['uuid'];
    $account_id = $reqinfo['account_id'];
    $msg_id = $reqinfo['message_id'];
    $list_ids = $reqinfo['list_ids'];
    $seg_ids = $reqinfo['seg_ids'];
    $from_addr = $reqinfo['from_addr'];
    $from_name = $reqinfo['from_name'];
    $reply_addr = $reqinfo['reply_addr'];
    $delivery_date = $reqinfo['delivery_date'];
    $message = get_message($bapi, $msg_id, true, true);
    //error_log($bapi->__getLastResponse(), 3, REQUEST_DIR."/soap_response");
    $msg_name = $message->name;
    $msg_contents = $message->content;
    $msg_preview_url = $message->preview_url;
    ?>
<h2><?php 
    echo HEADER_REVIEW;
    ?>
 - Message Display and Approval</h2>

<iframe id="message_preview" src="<?php 
    echo $msg_preview_url;
    ?>
"></iframe>

<?php 
    $msg_preview_url = urlencode($msg_preview_url);
    print '<a href="#" onclick="open_win(\'' . $msg_preview_url . '\')">Click here to see all the links in the message</a>';
    print '<br />';
    ?>

<form method="post" action="<?php 
    echo REVIEW_SCRIPT;
    ?>
">
<input type="hidden" name="fm_stage" value="reviewed"/>
<input type="hidden" name="fm_substage" value="<?php 
    echo VERIFY_TYPE_APPROVE;
    ?>
"/>
<input type="hidden" name="fm_sessionid" value="<?php 
    echo $session_id;
    ?>
"/>
<input type="hidden" name="fm_requestid" value="<?php 
    echo $req_id;
    ?>
"/>
<input type="hidden" name="fm_msgid" value="<?php 
    echo $msg_id;
    ?>
"/>

<p>
Please review the message itself on the right, and the message information below.  Then select Approve to send
the message out to the intended recipient(s), or Reject to defer sending.
</p>

<p>
Message Name: <b><?php 
    echo $msg_name;
    ?>
</b>
</p>

<?php 
    /****
      foreach ($msg_contents as $msg_content) {
        $msg_type = $msg_content->type;
        $msg_subject = $msg_content->subject;
        $msg_data = $msg_content->content;
    
        echo("<div class=\"message_metadata\">\n".
             "<p>Message as <i>$msg_type</i>, with Subject ".
             "[<b>$msg_subject</b>]</p>\n".
             "</div>\n".
             "<div class=\"message\">\n$msg_data\n</div>\n");
        //error_log($msg_data, 3, REQUEST_DIR."/error_log");
      }
      ****/
    print_nonmessage_info($bapi, $list_ids, $seg_ids, $delivery_date, $from_addr, $from_name, $reply_addr);
    include './include/display_onbehalfof.php';
    //ab
    ?>

  <input type="button" value="Approve" onClick="document.forms[0].fm_substage.value='<?php 
    echo VERIFY_TYPE_APPROVE;
    ?>
'; submit()"/>
  &nbsp;&nbsp;
  <input type="button" value="Reject" onClick="document.forms[0].fm_substage.value='<?php 
    echo VERIFY_TYPE_REJECT;
    ?>
'; submit()"/>
  &nbsp;&nbsp;
  <input type="button" value="Cancel" onClick="window.location='<?php 
    echo REVIEW_SCRIPT;
    ?>
'"/>
  &nbsp;&nbsp;
  <input type="button" value="ReAssign" onClick="document.forms[0].fm_stage.value='reassign'; submit()"/>
</form>

<div style="clear:both"></div>
<?php 
}
Esempio n. 27
0
echo has_message("majorCode") ? '<span class="help-block">' . get_message("majorCode") . '</span>' : "";
?>
						</div>
					</div>
					<div class="form-group <?php 
echo has_error("majorDescription") ? "has-error" : (has_success("majorDescription") ? "has-success" : "");
?>
">
						<label for="majorDescriptioninput" class="col-sm-4 control-label">Major Description</label>
						<div class="col-sm-8">
							<?php 
$majorDescriptioninput = array('name' => 'majorDescription', 'class' => "form-control", 'id' => 'majorDescriptioninput', 'value' => set_value("majorDescription", $majorinfo ? $majorinfo->major_description : ""), 'rows' => '3');
echo form_textarea($majorDescriptioninput);
?>
							<?php 
echo has_message("majorDescription") ? '<span class="help-block">' . get_message("majorDescription") . '</span>' : "";
?>
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-8 col-sm-offset-4">
							<button name="saveNewmajor" type="submit" class="btn btn-primary"> Save </button>
							<a href="<?php 
echo site_url("dashboard/curriculums/settings/majors");
?>
" id="canceladdNewmajor" class="btn btn-danger"> Cancel </a>
						<div>
					</div>
				</form>
			</div>
		</div>
Esempio n. 28
0
                }
            } catch (XML_RPC2_FaultException $e) {
                $message = get_message('ERR_CONNECT_SERVER');
                $forward = false;
            } catch (Exception $e) {
                $message = get_message('ERR_CONNECT_SERVER');
                $forward = false;
            }
        } else {
            if ($rauth->isLoggedIn()) {
                $message = get_message('ERR_MAXIMUM_LOGIN');
            } else {
                if ($rauth->isTimeout()) {
                    $message = get_message('ERR_USER_EXPIRED');
                } else {
                    $message = get_message('ERR_INVALID_USERNAME_OR_PASSWORD');
                }
            }
        }
    }
}
if ($forward) {
    $_SESSION['firstlogin'] = true;
}
?>

<?php 
// Login box
$request_uri = $_SERVER['REQUEST_URI'];
$loginbox = "<form name='login' action='{$request_uri}' method='post'>" . "<table>" . "<tr><td id='rh_login_text'>" . _("Username") . "</td>" . "<td><input type='text' name='user' size='22'></td></tr>" . "<tr><td id='rh_login_text'>" . _("Password") . "</td>" . "<td><input type='password' name='passwd' size='22'></td></tr>" . "<tr><td>&nbsp;</td>" . "<td><input type='submit' value='" . _("Login") . "' id='rh_login_button'>" . "</td></tr>" . "</table>" . "</form>";
$forward_script = $forward ? "window.open('{$RequestURL}');" : "";
    $y *= -1;
    $x += 96;
    $y += 48;
    echo 'background-position: ' . $x . 'px ' . $y . 'px;';
}
echo '}';
?>
	</style>
	<script src="res/game.js"></script>
	<script>
		<?php 
if (isset($_GET['rc']) && strlen($_GET['rc']) > 0) {
    echo "var messages = new Array();\n";
    echo "var msgCodes = new Array();\n";
    foreach (explode(',', $_GET['rc']) as $code) {
        echo "messages.push('" . get_message($code) . "')\n";
        echo "msgCodes.push('" . $code . "')\n";
    }
} else {
    echo "var messages = null;\n";
    echo "var msgCodes = null;\n";
}
if (isset($spacegame['player'])) {
    echo "var player_id = " . $spacegame['player']['record_id'] . ";\n";
    echo "var alliance = " . ($spacegame['player']['alliance'] > 0 ? $spacegame['player']['alliance'] : 0) . ";\n";
    echo "var base_id = " . $spacegame['player']['base_id'] . ";\n";
    echo 'var base_x = ' . $spacegame['player']['base_x'] . ";\n";
    echo 'var base_y = ' . $spacegame['player']['base_y'] . ";\n";
}
if (isset($players)) {
    echo "var players = [\n";
Esempio n. 30
0
<?php

// Include all the necessary function files
include_once 'include/inc.php';
// Use this function to include the required js and css, takes one option passed along as an addition to the path here if required it will be added to the begining of the default path which is /include/javascript and include/css. Don't include the trailing slash as that is defined explicitly in the function
echo get_javascript_files();
echo get_css_files();
// Read the config file and generate a list of thumbnails to choose from
echo create_image_select($img_settings);
echo '<h1>Your Image</h1>';
// Get an image by either it's template id
if (isset($_GET['t'])) {
    $id = $_GET['t'];
    echo '<img id="card" src="/image.php?t=' . $id . '" alt="' . $id . '" class="card-full">';
} elseif (isset($_GET['id'])) {
    // or by it's image id for finished memes.
    $id = $_GET['id'];
    $message = get_message($id, $mysqli);
    echo '<img id="card" src="/image.php?id=' . $id . '" alt="' . $message . '" class="card-full">';
}