[eluser]Volkscom[/eluser]
[quote author="klayner" date="1284825809"]О, то что было нужно. Как раз искали эти коды. Сейчас попробуем.
Спасибо (thanks, I need it code)[/quote]
Thanks for your reply
My controller is like this:
class Epay extends Controller {
function Epay() {
parent::Controller();
$this->load->helper(array('form','url','html'));
$this->load->database();
$this->load->language("forms");
$this->newspst = "";
}
function index() {
$data['title'] = "e-PAY";
$this->load->view('header',$data);
$this->load->view('menuIndex', $data);
$this->load->view('bodyIndex', $data);
$this->load->view('foot', $data);
}
function advrt() {
$data['title'] = "e-PAY";
$this->load->view('header', $data);
$this->load->library('advrtset');
$this->load->view('advertSet');
$this->load->view('foot', $data);
$this->load->model("advrtregnp");
}
function disFirstDetails($edition,$param,$matter,$date_entered,$category) {
$this->load->model("advrtregnp");
$lang = array('','000'=>'English','0D0'=>'Malayalam');
$dtsE = explode("**",$date_entered);
$dtDis = str_replace("**","<br>",$date_entered);
if($edition[(strlen($edition)-1)]==',')
$edition =substr($edition,0,(strlen($edition)-1));
// rate calculations
$rate_calculated=$this->advrtregnp->calculate_rate($category,$param,$lang[$param],$date_entered,$matter,$edition);
$data_val =array("lang"=>$lang[$param],"matter"=>$matter,"dtDis"=>$dtDis,"category"=>$category,"select_news"=>$rate_calculated['edition'],"rate"=>$rate_calculated['rate'],"totalRate"=>$rate_calculated['totalRate'],"totRt"=>$rate_calculated['totRtNp'],"totRtBx"=>$rate_calculated['totRtNPBx']);
$this->load->view('firstDetail',$data_val);
}
}
View page is like this...
<table border=0 id='FirstSet'><TR><TD class='algnRt'><?php echo $this->lang->line('language')?></TD><td><?php $burl = base_url();echo form_dropdown('lang',$this->advrtset->langar,'',' id="lang" onChange="dispNewsPpr(this.value,\''.$burl.'\')"');?></td><td width='<?php echo $gap; ?>'<?php echo $aln; ?>> </td><td></td></tr> <TR><TD class='algnRt'><?php echo $this->lang->line('category')?></TD><td><select class='frm' name="catgy" id="catgy"> <option value=""></option><?php $query = $this->db->query('SELECT * FROM newstype order by newstyp'); foreach ($query->result() as $row){echo "<option value='".$row->pid."'>".$row->newstyp."</option>";}?></select></td><td width='<?php echo $gap; ?>'<?php echo $aln; ?>></td><td></td></tr>
<tr><td valign='top' class='algnRt'><?php echo $this->lang->line('matter')?></td><td>
<?php $frmPw = array('name'=>'matter','id'=>'matter','class'=>'frm','cols'=>'30','rows'=>'5','onkeyup'=>'matterCount(this.value)');
echo form_textarea($frmPw);?></td><td width='<?php echo $gap; ?>'<?php echo $aln; ?>></td><td valign='top' class='disp'> <span id='mtrCnt'> </span></td></tr>
<tr> <td valign='top' id="newsPPrHdDisp"></td><td id="newsPPrDisp"></td>
<td width='<?php echo $gap; ?>'<?php echo $aln; ?> rowspan=2></td><td valign='top' rowspan=2></td></tr><tr><td valign='top' id="editionHdDisp"></td><td id="editionDisp"></td></tr><tr> <td>Dates</td><td><?php $current_date=gmdate("d")."/".gmdate("m")."/".gmdate("Y");$data =array('name'=>'NewsDt','id'=>'NewsDt','size'=>'8','value'=>$current_date,'onclick'=>"displayCalendar(document.forms[0].NewsDt,'dd/mm/yyyy',this)",
'readonly'=>'true');echo form_input($data);$image_properties = array('src'=>'epay_ims/cal.gif','alt'=>'calendar','width'=>'20','height'=>'20','onclick'=>"displayCalendar(document.forms[0].NewsDt,'dd/mm/yyyy',this)");
echo " ".img($image_properties);?><input type='button' name='addanother'><input type='button' name='delDt' onclick='dispDt4Del("<?php echo base_url();?>")' value='Delete Date' class='button'><br><input type='hidden' name='fullDt' id='fullDt'></td><td width='<?php echo $gap; ?>'<?php echo $aln; ?> rowspan=2></td><td valign='top' rowspan=2 id='npImg'></td></tr><tr><td><?php echo $this->lang->line('adCostIn')?> </td><td><?php echo form_dropdown('costin',$this->advrtset->costin,'',' id="costin"');?></td></tr><tr><td colspan="2" align="right"><input type='button' name='continue' value='Continue' class='button'></td></tr>
</table>