예제 #1
0
**/
include '../lib/agent.defines.php';
include_once '../lib/agent.module.access.php';
include '../lib/agent.smarty.php';
if (!$ACXACCESS) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
$smarty->display('main.tpl');
$DBHandle = DbConnect();
$table_message = new Table("cc_message_agent", "*");
$clause_message = "id_agent = " . $_SESSION['agent_id'];
$messages = $table_message->Get_list($DBHandle, $clause_message, 'order_display', 'ASC');
$cnts = new Constants();
$message_types = $cnts->getMsgTypeList();
?>
<br/><br/>
<?php 
if (is_array($messages) && sizeof($messages) > 0) {
    foreach ($messages as $message) {
        ?>

        <div id="msg" class="<?php 
        echo $message_types[$message['type']][2];
        ?>
" style="margin-top:0px;position:relative;<?php 
        if ($message['logo'] == 0) {
            echo 'background-image:none;padding-left:10px;';
        }
        ?>
예제 #2
0
			    die();
			}
			echo "false";
			die();
			break;

	}
}
//load home message agent
if(empty($action)) $action="add";

$table_message = new Table("cc_message_agent", "*");
$clause_message = "id_agent = $id";
$messages = $table_message -> Get_list($DBHandle, $clause_message, 'order_display', 'ASC');
$smarty->display('main.tpl');
$message_types = Constants::getMsgTypeList();
?>

<form action="<?php echo $PHP_SELF.'?id='.$id ?>" method="post" >
 	<input id="action" type="hidden" name="action" value="<?php echo $action;?>"/>
	<input id="id_msg" type="hidden" name="id_msg" value="<?php echo $id_msg;?>"/>
	<table class="epayment_conf_table">
		<tr>
			<td colspan="2">
			    <font style="font-weight:bold; " ><?php echo gettext("MESSAGE : "); ?> </font>
			 </td>
		</tr>
		<tr>
			<td colspan="2" align="center">
			    <textarea id="wysiwyg" class="form_input_textarea" name="message" cols="100" rows="10"><?php echo $message;?></textarea>
			 </td>