本文整理汇总了PHP中Model::view方法的典型用法代码示例。如果您正苦于以下问题:PHP Model::view方法的具体用法?PHP Model::view怎么用?PHP Model::view使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Model
的用法示例。
在下文中一共展示了Model::view方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
}
$fieldlist = "topic";
$r1 = Model::view($tablename, $cond, $fieldlist);
$i = 0;
$pdf->AddPage();
$pdf->SetFont("Arial", "B", "15");
$pdf->Cell(0, 5, $erp_course, 0, 1, "L");
$pdf->SetFont("Arial", "", "10");
$pdf->Cell(0, 5, "", 0, 1, "C");
while ($rr = mysql_fetch_assoc($r1)) {
$i++;
$pdf->Cell(0, 5, '(' . $i . '). ' . $rr['topic'], 0, 1);
//$pdf->Cell(60,-5,$rr['topic'],0,1,"C");
}
if ($course == 'Foundation Level ') {
$r1 = Model::view($tablename, $cond2, $fieldlist);
$pdf->Cell(0, 5, "", 0, 1, "C");
$pdf->SetFont("Arial", "B", "15");
$pdf->Cell(0, 5, preg_replace('/[0-9]/', '2', $erp_course), 0, 1, "L");
$pdf->SetFont("Arial", "", "10");
$pdf->Cell(0, 5, "", 0, 1, "C");
$i = 0;
while ($rr = mysql_fetch_assoc($r1)) {
$i++;
$pdf->Cell(0, 5, '(' . $i . '). ' . $rr['topic'], 0, 1);
//$pdf->Cell(60,-5,$rr['topic'],0,1,"C");
}
}
$pdf->Output("Certificate", 'I');
}
?>
示例2: sittings
public function sittings()
{
$model = new Model();
$model->view();
$model->sittings();
}
示例3: while
<!-- ####################################################################################################### -->
<!-- ####################################################################################################### -->
<!-- ####################################################################################################### -->
<!-- InstanceBeginEditable name="Contents" -->
<!-- Yogesh -->
<div class="wrapper row4">
<div id="container" class="clear">
<h2>View Applications for Training Centres/Partners</h2>
<h2 class="title"></h2>
<p>
<div align="right"><b>Status Code :</b> <font color="green">Confirmed</font> Pending <font color="#FF0000">Deleted</font></div>
<?php
require '../model.php';
require '../database.php';
$r = Model::view('trarningcentre order by type,city, name', '', '*');
echo "<table border=\"2\">";
echo "<tr>";
echo "<th> Application No</th>";
echo "<th> Type</th>";
echo "<th> City</th>";
echo "<th> Institute Name</th>";
echo "<th> Address</th>";
echo "<th> Contact Person</th>";
echo "<th> Contact Number</th>";
echo "<th> Email</th>";
echo "<th> Area</th>";
echo "<th> Action</th>";
echo "<th> Current Status</th>";
echo "</tr>";
while ($row = mysql_fetch_array($r)) {
示例4: while
<div id="container" class="clear">
<h2>Excel To Database</h2>
<h2 class="title"></h2>
<p>
<form name="form1" method="post" enctype="multipart/form-data" action="ExcelToDatabase_php.php">
<table align="center">
<tr>
<td>Choose Xls File</td>
<td><input type="file" require name="xls" /></td>
</tr>
<tr>
<td>Select College Name</td>
<td><select require name="cl_name" onchange="batch(this.value,'batch','s_batch','getValue()');">
<option value="">Select College Name</option>
<?php
$result = Model::view('register', "type='cl'", "name,ID");
while ($row = mysql_fetch_array($result)) {
echo "<option value='" . $row['ID'] . "'>" . $row['name'] . "</option>";
}
?>
</select></td>
</tr>
<tr>
<td>Select Batch ID</td>
<td id="batch"></td>
</tr>
<tr>
<td></td>
<td>
<input type="text" required name="batches_id" />
</td>
示例5: explode
<!-- ####################################################################################################### -->
<!-- InstanceBeginEditable name="Contents" -->
<!-- Yogesh -->
<div class="wrapper row4">
<div id="container" class="clear">
<h2>Study Material</h2>
<h2 class="title"></h2>
<p>
<table>
<form method="post" action="#" enctype="multipart/form-data">
<tr>
<td>Session ID</td>
<?php
$get = $_GET['session_id'];
$get = explode('_', $get);
$result = Model::view($table, "session_id='{$get['0']}'", '*');
?>
<td><input type="hidden" name="session_id" value="<?php
echo $get[0];
?>
" /><?php
echo $get[0];
?>
</td>
</tr>
<tr>
<td>E-Learning URL</td>
<td><input type="url" name="e_learning_url" />
<?php
while ($row = mysql_fetch_array($result)) {
$url = $row['e_learning_url'];
示例6: explode
$actual_end_time = explode(':', date('G:i:s'));
$h1 = $end_time[0];
$m1 = $end_time[1];
$h2 = $actual_end_time[0];
$m2 = $actual_end_time[1];
$hm1 = $h1 * 60 + $m1;
$hm2 = $h2 * 60 + $m2;
$df = $hm2 - $hm1;
$res = Model::view('session_entry', "ID='" . $_POST['id'] . "'", 'duration');
//$sql1="SELECT duration FROM session_entry WHERE ID='".$_POST['id']."'";
//$res=mysql_query($sql1)or die(mysql_error());
$row = mysql_fetch_array($res);
$limit = $row['duration'];
if ($df <= $limit) {
if ($_POST['test_id'] == $_POST['cr_test_id']) {
$res = Model::view('test_paper', "session_id='{$session_id}' order by ID asc limit 15", '*');
//$sql1="SELECT * FROM test_paper WHERE session_id='$session_id' order by ID asc limit 15";
//$res=mysql_query($sql1)or die(mysql_error());
$i = 0;
while ($row = mysql_fetch_array($res)) {
$i++;
?>
<tr bgcolor="#336699" style="color:#FFFFFF">
<td width="80px"><input type="hidden" value="<?php
echo $row['question_no'];
?>
" name="question_no[]" /><?php
echo "Question-" . $row['question_no'];
?>
</td>
示例7: while
?>
</td></tr>
<tr><td colspan="2" align="center"><input type="submit" name="submit" value="Claim" /></td></tr>
</form-->
</table>
<table>
<tr style="color:#FFFFFF; background:#9933CC"><td>BDM ID</td><td>Claim Point</td><td>Apply Date</td><td>Cashed Point</td><td>Payed Date</td><td>Balance</td><td>Action</td></tr>
<?php
$id = '';
if (isset($_GET['id'])) {
$id = $_GET['id'];
}
if ($id != '') {
$s = Model::view("bdm_payment", "bdm_id='{$id}' order by cashed_point asc", "*");
} else {
$s = Model::view("bdm_payment", "", "*");
}
while ($row = mysql_fetch_array($s)) {
?>
<tr><td><?php
echo $row['bdm_id'];
?>
</td><td><?php
echo $row['claim_point'];
?>
</td><td><?php
echo $row['apply_date'];
?>
</td><td><?php
echo $row['cashed_point'];
?>
示例8: mysql_num_rows
$s = mysql_num_rows($r1);
$s = $s + 1;
$tablename = 'register';
$field_list = "ID,register_id,course_type,course_level";
$condition = "ID=(select ID from {$tablename} where email='{$id}' and type='cl')";
$result = Model::view($tablename, $condition, $field_list);
$row = mysql_fetch_array($result);
$no = str_pad("{$s}", 4, "0", STR_PAD_LEFT);
echo $row['register_id'] . "-" . "{$no}";
?>
"></td></tr>
<tr><td>Student From Batch</td><td><select name="pre_batch">
<option value="">Select Batch</option>
<?php
$condition = "ID='" . $row['ID'] . "' and record_status!='Deleted'";
$r1 = Model::view($table, $condition, '*');
while ($s = mysql_fetch_array($r1)) {
echo "<option>" . $s['erp_course_code'] . "</option>";
}
?>
</select>
</td>
</tr>
<tr>
<td>
</td>
<td align="right">
<input type="submit" name="transfer_student" value="Submit" />
</td>
</tr>
</table>
示例9: str_replace
$course = $_POST['erp_course_' . "{$i}"];
} else {
$course = str_replace('Advanced Level', 'Module Specialization', $_POST['erp_course_' . "{$i}"]);
}
$tablename = 'erp_course';
$field = 'no_of_session';
$condition = "name_of_erpcourse='{$course}'";
$res = Model::view($tablename, $condition, $field);
//$sql="select * from erp_course where name_of_erpcourse='$course'";
//$res=mysql_query($sql)or die(mysql_error());
$row = mysql_fetch_array($res);
$session = $row['no_of_session'];
$tablename = 'session_entry';
$field = '*';
$condition = "batch_id='" . $_POST['batch_id_' . "{$i}"] . "' and name_of_erp_course='{$course}'";
$res1 = Model::view($tablename, $condition, $field);
//$sql1="select * from session_entry where batch_id='".$_POST['batch_id_'."$i"]."' and name_of_erp_course='".$_POST['erp_course_'."$i"]."'";
//$res1=mysql_query($sql1)or die(mysql_error());
$total = mysql_num_rows($res1);
if ($total < $session || $total == 0) {
$set_value = "batch_id='" . $_POST['batch_id_' . "{$i}"] . "', name_of_erp_course='{$course}', email='{$id}', session_no='" . $_POST['session_no_' . "{$i}"] . "', date='" . $_POST['year_' . "{$i}"] . "/" . $_POST['month_' . "{$i}"] . "/" . $_POST['day_' . "{$i}"] . "', start_time='" . $_POST['hour_' . "{$i}"] . ":" . $_POST['minute_' . "{$i}"] . "'";
$result = Model::save($tablename, $set_value);
//$query="insert into session_entry set batch_id='".$_POST['batch_id_'."$i"]."', name_of_erp_course='".$_POST['erp_course_'."$i"]."', email='$id', session_no='".$_POST['session_no_'."$i"]."', date='".$_POST['year_'."$i"]."/".$_POST['month_'."$i"]."/".$_POST['day_'."$i"]."', start_time='".$_POST['hour_'."$i"].":".$_POST['minute_'."$i"]."'";
//$result=mysql_query($query)or die(mysql_error());
header('location:college panel.php');
} else {
if ($total == $session) {
echo "<script>alert('This batch session limit is full');window.location.assign('college panel.php');</script>";
}
}
}
示例10: mysql_fetch_array
$ro = mysql_fetch_array($rs);
?>
<td align="left">Your Answer--<?php
echo str_replace(",", ", ", $ro['user_answer']);
?>
</td>
<td align="right">Marks Obtained--<?php
echo $ro['marks_to_ten'];
?>
/15</td>
</tr>
</table>
<table>
<tr><td align="center" colspan="2">Correct Answer</td></tr>
<?php
$res = Model::view('test_paper', "session_id='" . $url[2] . "' order by ID asc limit 15", "*");
//$sql1="SELECT * FROM test_paper WHERE session_id='".$url[2]."' order by ID asc limit 15";
//$res=mysql_query($sql1)or die(mysql_error());
$i = 0;
while ($row = mysql_fetch_array($res)) {
$i++;
?>
<tr bgcolor="#336699" style="color:#FFFFFF">
<td width="80px"><input type="hidden" value="<?php
echo $row['question_no'];
?>
" name="question_no[]" /><?php
echo "Question-" . $row['question_no'];
?>
</td>
示例11:
" <?php
if ($row['payment_status'] == 'Yes') {
echo "checked";
}
?>
name="session_id[]" /></td>
<td><?php
echo $row['batch_id'];
?>
</td>
<td><?php
echo $row['session_no'];
?>
</td>
<td><?php
$r1 = Model::view('register', "email='" . $row['actual_trainer_id'] . "' and type='tr'", "name");
$row1 = mysql_fetch_array($r1);
echo $row1['name'];
?>
</td>
<td><?php
echo $row['actual_trainer_id'];
?>
</td>
</tr>
<?php
}
?>
<input type="hidden" name="sid" value="<?php
echo $s_id;
?>
示例12: mysql_fetch_array
<td></td>
</tr>
</table>
<table width="100%">
<tr><td align="center" bgcolor="#666666"><font color="#FFFFFF"><b>Motivational Video</b></font></td></tr>
<tr>
<td>
<?php
$result = Model::view('study_material_video order by ID', "", '*');
//$query="select * from study_material_video order by ID";
//$result=mysql_query($query)or die(mysql_error());
$total1 = mysql_fetch_array($result);
$total = mysql_num_rows($result);
$id = rand($total1['ID'], $total);
$id1 = $id + 1;
$result1 = Model::view('study_material_video', "ID='{$id}' or ID='{$id1}'", '*');
//$query1="select * from study_material_video where ID='$id' or ID='$id1'";
//$result1=mysql_query($query1)or die(mysql_error());
while ($r = mysql_fetch_array($result1)) {
/*$contents = scandir("../ProVideo");
if($contents!=FALSE)
sort($contents);
$ran_no=rand(2,count($contents)-2);
*/
echo "<a target='_parent' href='vedio/video.php?path=" . $r['file'] . "_" . $r['title'] . "'>" . $r['title'] . "</a><br>";
}
?>
</td>
</tr>
</table>
</td>
示例13: explode
<form name="form1" method="post" action="genrate_certificate.php" target="_new">
<?php
$batch = explode('_', $_GET['batch_id']);
?>
<tr><input type="hidden" name="batch_id" value="<?php
echo $batch[0];
?>
" />
<input type="hidden" name="type" value="<?php
echo $batch[1];
?>
" />
<td>Select Student</td><td><select name="student_id">
<option value="all" selected="selected">All Student</option>
<?php
$r = Model::view('register', "batch='" . $batch[0] . "' and type='st'", "ID,email,name");
$i = 0;
while ($row = mysql_fetch_array($r)) {
if ($row['email'] != "email") {
$i++;
}
echo "<option value='" . $row['ID'] . "'>" . $row['name'] . " (" . $row['email'] . ")</option>";
}
?>
</select></td>
</tr>
<tr>
<td>Issued Date</td><td><input type="text" name="date" id="dt" readonly="true" value="<?php
echo date('d/m/Y');
?>
" />
示例14: co
</div>
<!-- InstanceEndEditable -->
<!-- ####################################################################################################### -->
<!-- ####################################################################################################### -->
<!-- ####################################################################################################### -->
<!-- InstanceBeginEditable name="Contents" -->
<!-- Yogesh -->
<div class="wrapper row4">
<div id="container" class="clear">
<h2>Pay Earn Points</h2>
<h2 class="title"></h2>
<p>
<table style="color:#000000">
<?php
$id = $_GET['id'];
$s = Model::view("bdm_payment", "ID='{$id}'", "claim_point,cashed_point");
$row = mysql_fetch_array($s);
$bl = $row['claim_point'] - $row['cashed_point'];
?>
<form name="form1" method="post" action="#" onsubmit="return co();">
<input type="hidden" name="id" value="<?php
echo $id;
?>
" />
<input type="hidden" name="cash" value="<?php
echo $row['cashed_point'];
?>
" />
<tr><td>Balance Point</td><td><input type="hidden" name="bl_point" value="<?php
echo $bl;
?>
示例15: while
echo 'Data Successfuly Saved !!!!';
}
?>
</label>
<table>
<form name="form" method="post" action="change_payment_status.php">
<tr>
<input type="hidden" name="batch_id" value="<?php
if (isset($_GET['batch_id'])) {
$batch = $_GET['batch_id'];
}
echo $batch;
?>
"/>
<?php
$result = Model::view('session_entry', "batch_id='{$batch}'", "ID,session_no,amount_status");
$i = 0;
$s_id = '';
while ($row = mysql_fetch_array($result)) {
$i++;
$id = $row['ID'];
if ($i > 1) {
$s_id .= ',' . $id;
} else {
$s_id = $id;
}
?>
<td><input type="checkbox" name="session_id[]" value="<?php
echo $row['ID'];
?>
" <?php