Viewing file: a17ca0711b594aae9b5600329ed0ac8261aded2e.file.question.tpl.php (8.48 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php /* Smarty version Smarty3-RC3, created on 2012-02-26 12:34:25 compiled from "modules/questions/templates/question.tpl" */ ?> <?php /*%%SmartyHeaderCode:14960808154f4a0ab17211a0-47231293%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed'); $_smarty_tpl->decodeProperties(array ( 'file_dependency' => array ( 'a17ca0711b594aae9b5600329ed0ac8261aded2e' => array ( 0 => 'modules/questions/templates/question.tpl', 1 => 1330252464, ), ), 'nocache_hash' => '14960808154f4a0ab17211a0-47231293', 'function' => array ( ), 'has_nocache_code' => false, )); /*/%%SmartyHeaderCode%%*/?> <form method="post" enctype="multipart/form-data" id="editorform">
<table class="editor-table">
<tr>
<th colspan="3">
<div id="current-language">
<?php $_smarty_tpl->tpl_vars['lang'] = new Smarty_Variable; $_from = $_smarty_tpl->getVariable('languages')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');} $_smarty_tpl->tpl_vars['smarty']->value['foreach']['loop']['iteration']=0; if (count($_from) > 0){ foreach ($_from as $_smarty_tpl->tpl_vars['lang']->key => $_smarty_tpl->tpl_vars['lang']->value){ $_smarty_tpl->tpl_vars['smarty']->value['foreach']['loop']['iteration']++; ?>
<input type="radio" <?php if ($_smarty_tpl->tpl_vars['lang']->value==$_smarty_tpl->getVariable('alang')->value){?> checked="checked" <?php }?> id="current-language<?php echo $_smarty_tpl->getVariable('smarty')->value['foreach']['loop']['iteration'];?> " name="current-language" value="<?php echo $_smarty_tpl->tpl_vars['lang']->value;?> " /><label for="current-language<?php echo $_smarty_tpl->getVariable('smarty')->value['foreach']['loop']['iteration'];?> "><img src="/admin/images/<?php echo $_smarty_tpl->tpl_vars['lang']->value;?> 30x20.gif" /></label>
<?php }} ?>
</div>
</th>
</tr>
<tr>
<td valign="top"><?php echo $_smarty_tpl->getVariable('ALANG')->value['Questions_question_date'];?> : <br />
<div style="background-color: white; padding:2px; "><?php echo GetUsefulDate($_smarty_tpl->getVariable('question_date')->value,true,true);?> </div></td>
<td colspan="2" valign="top"><?php echo $_smarty_tpl->getVariable('ALANG')->value['Questions_person_name'];?> :
<br />
<select name="question_person_id" id="question_person_id">
<?php $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_from = $_smarty_tpl->getVariable('persons')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');} $_smarty_tpl->tpl_vars['smarty']->value['foreach']['loop']['iteration']=0; if (count($_from) > 0){ foreach ($_from as $_smarty_tpl->tpl_vars['row']->key => $_smarty_tpl->tpl_vars['row']->value){ $_smarty_tpl->tpl_vars['smarty']->value['foreach']['loop']['iteration']++; ?>
<option value="<?php echo $_smarty_tpl->tpl_vars['row']->value['person_id'];?> " <?php if ($_smarty_tpl->tpl_vars['row']->value['person_id']==$_smarty_tpl->getVariable('question_person_id')->value){?> selected="selected" <?php }?>><?php ob_start();?><?php echo GetParam('DefaultLanguage');?> <?php $_tmp1=ob_get_clean();?><?php echo $_smarty_tpl->tpl_vars['row']->value["person_name_".$_tmp1];?> </option>
<?php }} ?>
</select></td>
</tr>
<tr>
<td>
<?php echo $_smarty_tpl->getVariable('ALANG')->value['Questions_question_author_name'];?> :<br />
<input type="text" size="40" name="question_author_name" value="<?php echo $_smarty_tpl->getVariable('question_author_name')->value;?> "/>
</td>
<td><?php echo $_smarty_tpl->getVariable('ALANG')->value['Questions_question_author_phone'];?> :<br />
<input type="text" size="20" name="question_author_phone" value="<?php echo $_smarty_tpl->getVariable('question_author_phone')->value;?> "/></td>
<td><?php echo $_smarty_tpl->getVariable('ALANG')->value['Questions_question_author_address'];?> :<br />
<input type="text" size="50" name="question_author_address" value="<?php echo $_smarty_tpl->getVariable('question_author_address')->value;?> "/></td>
</tr>
<tr>
<td>
<?php echo $_smarty_tpl->getVariable('ALANG')->value['Questions_question_author_email'];?> :<br />
<input type="text" size="35" name="question_author_email" value="<?php echo $_smarty_tpl->getVariable('question_author_email')->value;?> "/>
</td>
<td colspan="2" valign="bottom"><?php echo $_smarty_tpl->getVariable('ALANG')->value['Questions_question_author_email_send'];?> ?
<?php if ($_smarty_tpl->getVariable('question_author_email_send')->value=='Y'){?> <strong style="color: #900;"><?php echo $_smarty_tpl->getVariable('ALANG')->value['CoreYes'];?> </strong> <?php }else{ ?> <strong><?php echo $_smarty_tpl->getVariable('ALANG')->value['CoreNo'];?> </strong> <?php }?> <br />
<?php echo $_smarty_tpl->getVariable('ALANG')->value['Questions_question_author_display_answer'];?> ?
<?php if ($_smarty_tpl->getVariable('question_author_display_answer')->value=='Y'){?> <strong style="color: #900;"><?php echo $_smarty_tpl->getVariable('ALANG')->value['CoreYes'];?> </strong> <?php }else{ ?> <strong><?php echo $_smarty_tpl->getVariable('ALANG')->value['CoreNo'];?> </strong> <?php }?> </td>
</tr>
<tr>
<td colspan="3">
<?php echo $_smarty_tpl->getVariable('ALANG')->value['Questions_question_text'];?> :<br />
<textarea name="question_text" cols="100" rows="6"><?php echo $_smarty_tpl->getVariable('question_text')->value;?> </textarea>
</td>
</tr>
<tr>
<td colspan="3">
<?php echo $_smarty_tpl->getVariable('ALANG')->value['Questions_question_answer'];?> :<br />
<textarea name="question_answer" cols="60" rows="6" class="ckeditor"><?php echo $_smarty_tpl->getVariable('question_answer')->value;?> </textarea>
</td>
</tr>
<tr>
<td colspan="3"><?php echo $_smarty_tpl->getVariable('ALANG')->value['Questions_question_send_date'];?> :
<span id="send_date">
<?php if ($_smarty_tpl->getVariable('question_send_date')->value=="0000-00-00 00:00:00"){?>
<span style="color: red; font-size:12pt; font-weight:bold;">
<?php echo $_smarty_tpl->getVariable('ALANG')->value['QuestionsAnswerNotSent'];?>
</span>
<?php }else{ ?>
<span style="color: green; font-size:12pt; font-weight:bold;">
<?php ob_start();?><?php echo $_smarty_tpl->getVariable('question_send_date')->value;?> <?php $_tmp2=ob_get_clean();?><?php echo GetUsefulDate($_tmp2,true,true);?>
</span>
<?php }?>
</span>
<button type="button" onclick="send(<?php echo $_smarty_tpl->getVariable('question_id')->value;?> )" class="ui-state-default ui-widget ui-corner-all"><?php echo $_smarty_tpl->getVariable('ALANG')->value['CoreSend'];?> </button></td>
</tr>
<tr>
<td colspan="3"><?php echo $_smarty_tpl->getVariable('ALANG')->value['Questions_question_show'];?> ?
<label><input type="radio" value="Y" name="question_show" <?php if ($_smarty_tpl->getVariable('question_show')->value=='Y'){?> checked="checked" <?php }?>/><?php echo $_smarty_tpl->getVariable('ALANG')->value['CoreYes'];?> </label>
<label><input type="radio" value="N" name="question_show" <?php if ($_smarty_tpl->getVariable('question_show')->value=='N'){?> checked="checked" <?php }?>/><?php echo $_smarty_tpl->getVariable('ALANG')->value['CoreNo'];?> </label>
</td>
</tr>
<tr>
<td colspan="3" align="center"><input value="<?php echo $_smarty_tpl->getVariable('ALANG')->value['CoreSave'];?> " type="submit" name="submit" id="submit" class="ui-state-default ui-widget ui-corner-all" /></td>
</tr>
</table>
<input type="hidden" name="<?php echo $_smarty_tpl->getVariable('oper')->value;?> " value="yes" />
</form>
<script language="javascript">
function send(question_id)
{
var qString = $("#editorform").formSerialize();
$.post("/admin-asynch.php?mod=Questions&question_id="+question_id, qString, function(data)
{
$.post("/admin-asynch.php?mod=Questions&send&question_id="+question_id, {}, function (data)
{
if (data.status == 'ok')
{
$("#send_date").html(data.date);
$("#send_date").css({ 'color' : 'green', 'font-family' : 'Verdana', 'font-size' : '12pt', 'font-weight' : 'bold'});
}
if (data.status == 'error')
{
$("#send_date").html(data.error);
$("#send_date").css({ 'color' : 'red', 'font-family' : 'Verdana', 'font-size' : '12pt', 'font-weight' : 'bold'});
}
}, 'json'
);
}, 'json');
}
</script>
|