Esempio n. 1
0
</thead>
<?php 
$result = mysql_query("SELECT * FROM subject_master  where f_id='" . $_GET['f_id'] . "' order by batch_id, sem_id, division_id");
//lets make a loop and get all news from the database
$i = 1;
if (mysql_num_rows($result) > 0) {
    while ($myrow = mysql_fetch_array($result)) {
        //begin of loop
        //now print the results:
        echo '<tr>';
        echo "<td align=center>" . $i . "</td>";
        $i++;
        echo "<td align=center>" . $myrow['sub_name'] . "</td>";
        echo "<td align=center>" . sem_name($myrow['sem_id']) . "</td>";
        echo "<td align=center>" . batch_name($myrow['batch_id']) . "</td>";
        echo "<td align=center>" . division_name($myrow['division_id']) . "</td>";
        echo "<td align=center>" . "<a href=\"edit_subject.php?sub_id={$myrow['sub_id']}\">edit</a> /" . "<a href=\"delete_subject.php?sub_id={$myrow['sub_id']}&f_id={$myrow['f_id']}\">delete</a>" . "</td>";
        echo '</tr>';
    }
    //end of loop
} else {
    echo '<tr><td colspan=6 align=center>No record found!</td></tr>';
}
?>
</table>
</td>
</tr>
</table>
</body>
</html>
Esempio n. 2
0
 $total_ans6 = 0;
 $total_ans7 = 0;
 $total_ans8 = 0;
 $total_ans9 = 0;
 while ($arr = mysql_fetch_array($result1)) {
     $total_ans1 = $total_ans1 + $arr['ans1'];
     $total_ans2 = $total_ans2 + $arr['ans2'];
     $total_ans3 = $total_ans3 + $arr['ans3'];
     $total_ans4 = $total_ans4 + $arr['ans4'];
     $total_ans5 = $total_ans5 + $arr['ans5'];
     $total_ans6 = $total_ans6 + $arr['ans6'];
     $total_ans7 = $total_ans7 + $arr['ans7'];
     $total_ans8 = $total_ans8 + $arr['ans8'];
     $total_ans9 = $total_ans9 + $arr['ans9'];
 }
 $graphTitle = "Faculty Name: " . faculty_name($arr1['f_id']) . "  Subject: " . subject_name($arr1['sub_id']) . "    Batch: " . batch_name($arr1['batch_id']) . " - Sem: " . sem_name($arr1['sem_id']) . " - Div: " . division_name($arr1['division_id']) . " ( Feedback " . $arr1['feedback_no'] . " )   Date: " . date('d-m-Y');
 $xLabel = "Matrix (Students " . $total_std . ")";
 $yLabel = "Score";
 $data['Punctuality'] = $total_ans1 / $total_std;
 $data['Preparedness'] = $total_ans2 / $total_std;
 $data['Communication Skill'] = $total_ans3 / $total_std;
 $data['Methodology'] = $total_ans4 / $total_std;
 $data['Objectives'] = $total_ans5 / $total_std;
 $data['Solving Queries'] = $total_ans6 / $total_std;
 $data['Treated Well'] = $total_ans7 / $total_std;
 $data['Value Addition'] = $total_ans8 / $total_std;
 $data['Faculty to be cont.'] = $total_ans9 / $total_std;
 //print_r($data);
 //exit;
 //getting the maximum and minimum values for Y
 $newData = $data;
//echo $search_para_str;
//for question 1
$sql_query_q1 = 'select ans1, count(*), b_id, batch_id, sem_id, division_id, f_id, sub_id from feedback_master where (' . $search_para_str . ') group by ans1 order by ans1';
//print $sql_query_q1;
$res = mysql_query($sql_query_q1) or die(mysql_error('sql error'));
$i = 0;
$data_array = array();
while ($myrow = mysql_fetch_array($res)) {
    // $myrow["ans1"] = rating
    // $myrow[1] = student count
    $data_array[$myrow["ans1"]] = $myrow[1];
    if ($i == 0) {
        $branch_name = branch_name($myrow['b_id']);
        $batch_name = batch_name($myrow['batch_id']);
        $sem_name = sem_name($myrow['sem_id']);
        $division_name = division_name($myrow['division_id']);
        $faculty_name = faculty_name($myrow['f_id']);
        $subject_name = subject_name($myrow['sub_id']);
    }
    $i++;
}
?>
																						
	<script type="text/javascript">
	/*
	$(function() {
		var previousPoint = null;
		$("#que1_data").bind("plothover", function (event, pos, item) {
			$("#x").text(pos.x.toFixed(2));
			$("#y").text(pos.y.toFixed(2));								
				if (item) {
Esempio n. 4
0
		<td>Division</td>
        <td>
		  <?php 
$sel_div = "select * from division_master ";
$res_div = mysql_query($sel_div) or die(mysql_error());
while ($div_combo = mysql_fetch_array($res_div)) {
    $div_array[] = array('id' => $div_combo['id'], 'text' => $div_combo['division']);
}
// echo tep_draw_pull_down_menu('division',$div_array, $default,' tabindex="4" ');
?>
		  <input type="hidden" name="division" value="<?php 
echo $result_para['division_id'];
?>
"/>
			<?php 
echo division_name($result_para['division_id']);
?>
		</td>
		</tr>
		<tr>
          <td width="114">Sutdent ID </td>
          <td width="228"><label>
            <input name="roll_no" type="text" tabindex="1" align="left" onKeyUp="javascript:dodacheck(feedback_form.roll_no);" value=""/>
          </label></td>
          <td width="1">&nbsp;</td>
          <!--<td width="98">Date</td>
          <td width="175"><label>
            <input type="text" name="date" id="date" readonly tabindex="2"/><a href="javascript:viewcalendar()">cal</a>
          </label></td>-->
		  
        </tr>
Esempio n. 5
0
function write_xls($sql)
{
    $sql = str_replace('\\', '', $sql);
    $excel = new ExcelWriter('excel_report/' . date('m_d_Y_s') . '_feedback_report.xls');
    $file_name = date('m_d_Y_s') . '_feedback_report.xls';
    if ($excel == false) {
        echo $excel->error;
    }
    $result1 = mysql_query($sql) or die(mysql_error());
    $arr1 = mysql_fetch_array($result1);
    if (mysql_num_rows($result1) != 0) {
        $myArr = array("Branch", branch_name($arr1['b_id']), "", "Semester", sem_name($arr1['sem_id']));
        $excel->writeLine($myArr);
        $myArr = array("", "", "", "", "", "");
        $excel->writeLine($myArr);
        $myArr = array("Batch", batch_name($arr1['batch_id']), "", "Division", division_name($arr1['division_id']), "", "Feedback No", $arr1['feedback_no']);
        $excel->writeLine($myArr);
        $myArr = array("", "", "", "", "", "");
        $excel->writeLine($myArr);
        $myArr = array("Faculty Name:", faculty_name($arr1['f_id']), "", "Subject:", subject_name($arr1['sub_id']));
        $excel->writeLine($myArr);
        $myArr = array("", "", "", "", "", "");
        $excel->writeLine($myArr);
        $myArr = array("", "", "", "", "", "");
        $excel->writeLine($myArr);
        /*$myArr=array("Remark(s)");//"Ans1","Ans2","Ans3","Ans4","Ans5","Ans6","Ans7","Ans8","Ans9"
        		$excel->writeLine($myArr);
        		$myArr=array("","","","","","");
        		$excel->writeLine($myArr);*/
        $myArr = array("Ans1", "Ans2", "Ans3", "Ans4", "Ans5", "Ans6", "Ans7", "Ans8", "Ans9", "Remark");
        $excel->writeLine($myArr);
        $result = mysql_query($sql) or die(mysql_error());
        $total_ids = "0";
        $r_id = 1;
        while ($arr = mysql_fetch_array($result)) {
            /*if($arr['remark']!=NULL)
            		{	
            			$myArr=array(strtolower($arr['remark']));				
            			$excel->writeLine($myArr);
            			$r_id++;			
            		}*/
            $myArr = array($arr['ans1'], $arr['ans2'], $arr['ans3'], $arr['ans4'], $arr['ans5'], $arr['ans6'], $arr['ans7'], $arr['ans8'], $arr['ans9'], $arr['remark']);
            $excel->writeLine($myArr);
            $r_id++;
        }
        $myArr = array("", "", "", "", "", "");
        $excel->writeLine($myArr);
        $excel->close();
        return $file_name;
    } else {
        echo '<p align=center>No Record Found!.</p>';
    }
}