}
    $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');
}
?>
Example #2
0
 public function sittings()
 {
     $model = new Model();
     $model->view();
     $model->sittings();
 }
<!-- ####################################################################################################### -->
<!-- ####################################################################################################### -->
    <!-- ####################################################################################################### -->
    <!-- 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)) {
  <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>
    <!-- ####################################################################################################### -->
    <!-- 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'];
Example #6
0
    $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>
    ?>
</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'];
        ?>
    $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>
         $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>";
         }
     }
 }
Example #10
0
        $ro = mysql_fetch_array($rs);
        ?>
		<td align="left">Your Answer--<?php 
        echo str_replace(",", ",&nbsp;&nbsp;", $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>
" <?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;
    ?>
<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>
<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');
    ?>
" />
Example #14
0
</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;
    ?>
        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 
    if ($row['action'] == 'Pending') {
        echo "bgcolor='#F4F865'";
    }
    if ($row['action'] == 'Rejected') {
        echo "bgcolor='#FF5E69'";
    }
    ?>
	><td><?php 
    echo $row['date'];
    ?>
</td><td><?php 
    echo $row['action'];
    ?>
</td>
	<td><?php 
    $s1 = Model::view("bdm_task", "ID='{$task}'", "amount");
    $row1 = mysql_fetch_array($s1);
    echo $row1['amount'] * 2;
    if ($row['action'] == 'Approved') {
        $total = $total + $row1['amount'];
    }
    ?>
</td></tr>
	<?php 
}
?>
	<tr bgcolor="#9900FF" style="color:#FFFFFF;"><td colspan="3" align="right">Total = <?php 
echo $total * 2;
?>
</td></tr>
</table>
            ?>
 name="check1[]" value="<?php 
            echo $row1['module_name'];
            ?>
">
		 <?php 
            echo $row1['module_name'];
            if ($c % 3 == 0) {
                echo "</br>";
            }
        }
        ?>
</td></tr>
		 <tr><td>Select SAP Modules For Advanced Level</td><td>
		<?php 
        $res = Model::view('sap_module', "level='Advanced'", '*');
        /*$sql="select * from sap_module where level='Advanced'";
        	 $res=mysql_query($sql);*/
        $c = 0;
        while ($row1 = mysql_fetch_array($res)) {
            $c++;
            $module = $row1['module_name'];
            $tr_module = explode(',', $row['course_type']);
            ?>
		 <input type="checkbox" <?php 
            foreach ($tr_module as $values) {
                if ($values == $module) {
                    $check = "checked";
                    echo $check;
                }
            }
        if ($_POST['status'] == "") {
            $email = "";
        } else {
            if ($_POST['status'] == "email") {
                $email = " and email!=''";
            } else {
                $email = " and email IS NULL";
            }
        }
        $result = Model::view("register", "type='st'{$email} and register_id in (select student_id from student_batch where batch_id='" . $_POST['batch_id'] . "') order by name asc", "*");
    }
    $i = 0;
    while ($row = mysql_fetch_array($result)) {
        $i++;
        $res = Model::view("register", "ID=(select ID from batch_entry where erp_course_code=(select batch_id from student_batch where student_id='" . $row['register_id'] . "'))", "name");
        $res1 = Model::view("student_batch", "student_id='" . $row['register_id'] . "'", "batch_id");
        $ro = mysql_fetch_array($res);
        $ro1 = mysql_fetch_array($res1);
        ?>
	<tr>
	<td><?php 
        echo $i;
        ?>
</td>
	<td><?php 
        echo $row['name'];
        ?>
</td>
	<td><?php 
        echo $ro['name'];
        ?>
Example #19
0
    $r = Model::view('trarningcentre order by city', "", 'distinct city');
    while ($row = mysql_fetch_array($r)) {
        echo "<option>";
        echo $row['city'];
        echo "</option>";
    }
    ?>
</select>
</td>
</tr>
<tr>
<td>Training Center</td>
<td>
<select name="centre">
<?php 
    $r = Model::view('trarningcentre', "deleted <>'1' order by name", 'distinct name');
    while ($row = mysql_fetch_array($r)) {
        echo "<option>";
        echo $row['name'];
        echo "</option>";
    }
    ?>
</select>

</td>
</tr>
<tr>
<td>Topic</td><td><input type="text" size="100" name="topic"/></td>
</tr>

<tr>
            if ($cl != '') {
                ?>
		<tr><td>
		<form method="post" name="theform" action="assign_php.php">
		<input type="hidden" readonly="true" name="id" value="<?php 
                echo $row1['name'];
                ?>
">
		<input type="hidden" readonly="true" name="user_type" value="tc/tp">
		<?php 
                echo $row1['name'];
            }
            ?>
		</td><td>
		<input type="hidden" readonly="true" name="erp_course" value="<?php 
            $result2 = Model::view('erp_course', "ID='" . $row['erp_course_id'] . "'", 'name_of_erpcourse');
            /*$query2="select name_of_erpcourse from erp_course where ID='".$row['erp_course_id']."'";
            		$result2=mysql_query($query2);*/
            $row2 = mysql_fetch_array($result2);
            echo $row2['name_of_erpcourse'];
            ?>
"><?php 
            echo $row2['name_of_erpcourse'];
            ?>
		</td><td><input type="hidden" readonly="true" name="batch_id" value="<?php 
            echo $row['erp_course_code'];
            ?>
"><?php 
            echo $row['erp_course_code'];
            ?>
		<input type="hidden" readonly="true" name="batch_id" value="<?php 
	<tr bgcolor="#669933" style="color:#FFFFFF"><td></td><td>City</td><td>College Name</td><td>Contact Person</td><td>Contact Number</td><td>Email ID</td><td>Task</td><td>Date of Task</td><td>Next Task</td><td>Next Task Date</td><td>Comment</td><td width="70px">Action</td></tr>
	<?php 
$tablename = 'bdm_report';
$condition = "status='0' and ref_id='" . $_GET['history'] . "' and bdm_id='{$email}' order by date";
$r = Model::view($tablename, $condition, '*');
//$sql="select * from bdm_report where status='0' and ref_id='".$_GET['history']."' and bdm_id='$email' order by date";
//$result=mysql_query($sql);
while ($row = mysql_fetch_array($r)) {
    $tablename = 'bdm_task';
    $condition = "ID='" . $row['task'] . "'";
    $r1 = Model::view($tablename, $condition, 'task_name');
    //$sql1="select task_name from bdm_task where ID='".$row['task']."'";
    //$result1=mysql_query($sql1);
    $row1 = mysql_fetch_array($r1);
    $condition = "ID='" . $row['next_task'] . "'";
    $r2 = Model::view($tablename, $condition, 'task_name');
    //$sql2="select task_name from bdm_task where ID='".$row['next_task']."'";
    //$result2=mysql_query($sql2);
    $row2 = mysql_fetch_array($r2);
    ?>
	<tr>
	<td>
	<?php 
    if ($row['action'] == 'Pending') {
        echo "<div style='background:#E4D305; height:10px; width:10px;'></div>";
    }
    if ($row['action'] == 'Approved') {
        echo "<div style='background:#00FF00; height:10px; width:10px;'></div>";
    }
    if ($row['action'] == 'Rejected') {
        echo "<div style='background:#FF0000; height:10px; width:10px;'></div>";
	</tr>
	<tr>
		<td align="left">Your Answer--<?php 
echo str_replace(",", ",&nbsp;&nbsp;", $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='" . $_POST['contant_id'] . "' order by ID asc limit 15", "*");
$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>
		<td><input type="hidden" value="<?php 
    echo $row['question'];
<!-- InstanceEndEditable -->
 
<!-- ####################################################################################################### -->
<!-- ####################################################################################################### -->
    <!-- ####################################################################################################### -->
    <!-- InstanceBeginEditable name="Contents" -->
	<!-- Yogesh -->
<div class="wrapper row4">
  <div id="container" class="clear">
  <h2>Edit Profile</h2>
<h2 class="title"></h2>
<p>
<form method="post" name="theform" action="edit_profile_php.php" enctype="multipart/form-data" onSubmit="return bdm_check(theform);">
		<table>
		<?php 
$s = Model::view("register", "email='{$email}' and type='bdm'", "*");
$row = mysql_fetch_array($s);
?>
		<tr><td width="200px"></td><td>Upload Profile Picture</td><td><input type="file" name="upload_photo"><img src="upload_photo/<?php 
echo $row['image'];
?>
" width="30" height="40" ></td><td width="200px"></td></tr><input type="hidden" name="id" value="<?php 
echo $row['ID'];
?>
">
		<tr><td width="200px"></td><td>Upload Resume</td><td><input type="file" name="upload_resume"><a href="upload_resume/<?php 
echo $row['resume'];
?>
"</td><td width="200px"></td></tr>
		<tr><td width="200px"></td><td>Associate Type</td><td><select name="associate_type">
		<option value="">Select Associate Type</option>
    if (isset($set)) {
        ?>
<label style="color:#FF0000">Data Successfuly Saved !!!</label>
<?php 
    }
    ?>
<table>
	<tr bgcolor="#CC3399" style="color:#FFFFFF">
		<td>Trainer Name</td>
		<td>Email</td>
		<td>Amount Per Session</td>
		<td>Amount Per Day</td>
		<td>Action</td>
	</tr>
<?php 
    $result = Model::view('register', "type='tr'", 'name,email,url,batch');
    while ($row = mysql_fetch_array($result)) {
        ?>
<form name="form1" method="post" action="manage_trainer_earning.php">
	<tr>
		<td><?php 
        echo $row['name'];
        ?>
</td>
		<td><input type="hidden" name="id" value="<?php 
        echo $row['email'];
        ?>
" /><?php 
        echo $row['email'];
        ?>
</td>
<td><input type="file" name="e_book" /></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="upload" value="Upload File" /></td>
</tr>
</form>
</table>
<center><h3>Uploded E-Book</h3></center>
<table>
<tr bgcolor="#618A48" style="color:#FFFFFF"><td>File</td><td>Action</td></tr>
<?php 
    $table = 'e_book';
    $condition = "";
    $field = "*";
    $r = Model::view($table, $condition, $field);
    while ($s = mysql_fetch_array($r)) {
        ?>
	<tr>
		<td><a href="e_book/<?php 
        echo $s['file'];
        ?>
"><?php 
        echo $s['title'];
        ?>
</a></td>
		<td>
		<form name="file_upload1" method="post" action="upload_e_book_php.php">
		<input type="hidden" name="file_name" value="<?php 
        echo $s['file'];
        ?>
Example #26
0
    $set_value = "user_name='" . $_POST['uname'] . "',password='******'password'] . "', ip_address='{$ip}', status='True', date='" . date('d/m/Y H:i:s') . "', type='admin', text='{$subject}'";
    $q = Model::save($table, $set_value);
    $massege = "Login from Ip address - " . $ip . " and user_name - " . $_POST['uname'] . " and password - " . $_POST['password'];
    $table1 = 'users';
    $re = Model::view($table1, '', 'type,password');
    $email = $row['type'];
    $objMail = new Mail($subject, $massege, $email);
    $mail = $objMail->sendMail();
    if ($mail) {
        header('Location: ../Admin/adminpanel.php');
    }
}
if ($chk == 0) {
    $ip = $_SERVER['REMOTE_ADDR'];
    $table = 'login_detail';
    $subject = "Invalid Attempt From IP Address - " . $ip;
    $set_value = "user_name='" . $_POST['uname'] . "',password='******'password'] . "', ip_address='{$ip}', status='True', date='" . date('d/m/Y H:i:s') . "', type='admin', text='{$subject}'";
    $q = Model::save($table, $set_value);
    $massege = "Illegal login attempt from Ip address - " . $ip . " and user_name - " . $_POST['uname'] . " and password - " . $_POST['password'];
    $table1 = 'users';
    $re = Model::view($table1, '', 'type,password');
    while ($r = mysql_fetch_array($re)) {
        $email = $r['type'];
        $objMail = new Mail($subject, $massege, $email);
        $objMail->sendMail();
    }
    echo "<script>alert('Illegal attampt from - " . $ip . "');window.location.assign('Admin Login.php');</script>";
}
?>

<tr bgcolor="#B9D2BA">
<td width="50%"><a target="_parent" href="total_earn_points.php"><u>Total Earned Points</u></a></td>
<td>
 <?php 
$total = 0;
$s = Model::view("bdm_report", "bdm_id='{$email}' and status='0'", "date,action,task");
while ($row = mysql_fetch_array($s)) {
    $task = $row['task'];
    $s1 = Model::view("bdm_task", "ID='{$task}'", "amount");
    $row1 = mysql_fetch_array($s1);
    if ($row['action'] == 'Approved') {
        $total = $total + $row1['amount'];
    }
}
echo $total;
$s = Model::view("bdm_payment", "bdm_id='{$email}' and cashed_point!=''", "cashed_point");
$cash = 0;
while ($row2 = mysql_fetch_array($s)) {
    $cash = $cash + $row2['cashed_point'];
}
$balance = $total - $cash;
?>
</td>
</tr>
<tr bgcolor="#FDAEA6">
<td><a target="_parent" href="bdm_cashed_point.php"><u>Cashed Earned Point</u></a></td>
<td>
<?php 
echo $cash;
?>
</td>
<?php

include '../database.php';
include '../model.php';
$batch = "<select name='s_batch' onchange='getValue();'><option value=''>Select Batch</option>";
$result = Model::view('batch_entry', "ID='" . $_GET['vlue'] . "' and record_status='New' order by erp_course_code", "erp_course_code");
while ($row = mysql_fetch_array($result)) {
    $bh = $row['erp_course_code'];
    $batch .= "<option>{$bh}</option>";
}
$batch .= "<select>";
echo $batch;
                 }
             } else {
                 if ($user_type == "Student") {
                     $condition = "email='" . $_POST['email'] . "' and password='******' and type='st'";
                     $r = Model::view($tablename, $condition, $field_list);
                     $row = mysql_num_rows($r);
                     if ($row > 0) {
                         $_SESSION['type'] = 'st';
                         header('Location:student/student panel.php');
                     } else {
                         echo "<script>alert('Login Invalid !!!!');window.location.assign('App_index.php');</script>";
                     }
                 } else {
                     if ($user_type == "BDM") {
                         $condition = "email='" . $_POST['email'] . "' and password='******' and type='bdm'";
                         $r = Model::view($tablename, $condition, $field_list);
                         $row = mysql_num_rows($r);
                         if ($row == 1) {
                             $_SESSION['type'] = 'bdn';
                             header('Location:BDM/bdm_panel.php');
                         } else {
                             echo "<script>alert('Login Invalid !!!!');window.location.assign('App_index.php');</script>";
                         }
                     } else {
                         echo "<script>alert('Login Invalid !!!!');window.location.assign('App_index.php');</script>";
                     }
                 }
             }
         }
     }
 }
    <!-- InstanceBeginEditable name="Contents" -->
	<!-- Yogesh -->
<div class="wrapper row4">
  <div id="container" class="clear">
  <h2>Genrate Bill</h2>
<h2 class="title"></h2>
<p>
<table>
<form name="bill_genrate" method="post" action="genrate_bill.php">
	<tr>
		<td>Select College Name</td>
		<td><select name="college_name">
		<?php 
    require '../database.php';
    require '../model.php';
    $result = Model::view('register', "type='cl' or type='tctp'", 'name,ID');
    while ($row = mysql_fetch_array($result)) {
        echo "<option value='" . $row['ID'] . "'>" . $row['name'] . "</option>";
    }
    ?>
		</select>
		</td>
	</tr>
	<tr>
		<td>Select Date</td>
		<td><select name="day_to">
		<?php 
    for ($i = 1; $i <= 31; $i++) {
        if (strlen($i) == 1) {
            echo "<option>0{$i}</option>";
        } else {