• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Batches类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Batches的典型用法代码示例。如果您正苦于以下问题:PHP Batches类的具体用法?PHP Batches怎么用?PHP Batches使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Batches类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: getBatch

function getBatch($id)
{
    $batch = Batches::model()->findByAttributes(array("id" => $id));
    if ($batch != NULL) {
        echo $batch->name;
    }
}
开发者ID:akilraj1255,项目名称:rajeshwari,代码行数:7,代码来源:index.php


示例2: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     $model = new Courses();
     $model_1 = new Batches();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['Courses'])) {
         $model_1->attributes = $_POST['Batches'];
         $model->attributes = $_POST['Courses'];
         if ($model->save()) {
             $model_1->course_id = Yii::app()->db->getLastInsertId();
             $model_1->save();
             $this->redirect(array('view', 'id' => $model->id));
         }
     }
     $this->render('create', array('model' => $model, 'model_1' => $model_1));
 }
开发者ID:SoftScape,项目名称:open-school-CE,代码行数:21,代码来源:CoursesController.php


示例3: actionIndex

 public function actionIndex()
 {
     $criteria = new CDbCriteria();
     $criteria->condition = '`file`<>:null';
     $criteria->params = array(':null' => '');
     $roles = Rights::getAssignedRoles(Yii::app()->user->id);
     // check for single role
     $user_roles = array();
     foreach ($roles as $role) {
         $user_roles[] = '"' . $role->name . '"';
     }
     $teacher = Employees::model()->findByAttributes(array('uid' => Yii::app()->user->id));
     $batches = Batches::model()->findAllByAttributes(array('employee_id' => $teacher->id));
     foreach ($batches as $classteacher) {
         $batch[] = $classteacher->id;
     }
     $timetable = TimetableEntries::model()->findAllByAttributes(array('employee_id' => $teacher->id));
     foreach ($timetable as $period) {
         $batch[] = $period->batch_id;
     }
     $unique_batch = array_unique($batch);
     if (count($unique_batch) > 0) {
         $criteria->condition .= ' AND (`placeholder`=:null OR `created_by`=:user_id OR (`placeholder` IN (' . implode(',', $user_roles) . ')) AND (`batch` IS NULL OR `batch` IN (' . implode(',', $unique_batch) . '))) ';
     } else {
         $criteria->condition .= ' AND (`placeholder`=:null OR `created_by`=:user_id) OR (`placeholder` IN (' . implode(',', $user_roles) . '))';
     }
     $criteria->params[':user_id'] = Yii::app()->user->id;
     $criteria->order = '`created_at` DESC';
     $files = FileUploads::model()->findAll($criteria);
     if (isset($_POST['Downfiles'])) {
         $selected_files = $_POST['Downfiles'];
         $slfiles = array();
         foreach ($selected_files as $s_file) {
             $model = FileUploads::model()->findByPk($s_file);
             if ($model != NULL) {
                 $slfiles[] = 'uploads/shared/' . $model->id . '/' . $model->file;
             }
         }
         $zip = Yii::app()->zip;
         $fName = $this->generateRandomString(rand(10, 20)) . '.zip';
         $zipFile = 'compressed/' . $fName;
         if ($zip->makeZip($slfiles, $zipFile)) {
             $fcon = file_get_contents($zipFile);
             header('Content-type:text/plain');
             header('Content-disposition:attachment; filename=' . $fName);
             header('Pragma:no-cache');
             echo $fcon;
             unlink($zipFile);
         } else {
             Yii::app()->user->setFlash('success', 'Can\'t download');
         }
     }
     $this->render('/fileUploads/index', array('files' => $files));
 }
开发者ID:akilraj1255,项目名称:rajeshwari,代码行数:54,代码来源:TeachersController.php


示例4: getScheduleCountForBatch

 static function getScheduleCountForBatch($batchId, $startDate, $endDate)
 {
     $batchEndDate = Batches::select('end_date')->where("id", "=", $batchId)->get();
     //$batchEndDate['0']->end_date;
     /* BatchSchedule::where('batch_id', '=', $batchId)
     		->whereBetween('schedule_date', array($startDate, $endDate))
     		->count();
     		
     		print_r(DB::getQueryLog());
     		
     		exit(); */
     return BatchSchedule::where('batch_id', '=', $batchId)->whereBetween('schedule_date', array($startDate, $endDate))->count();
 }
开发者ID:Headrun-php,项目名称:TLG,代码行数:13,代码来源:BatchSchedule.php


示例5: actionIndex

 /**
  * Specifies the access control rules.
  * This method is used by the 'accessControl' filter.
  * @return array access control rules
  */
 public function actionIndex()
 {
     $criteria = new CDbCriteria();
     $criteria->condition = '';
     $roles = Rights::getAssignedRoles(Yii::app()->user->id);
     // check for single role
     $user_roles = array();
     foreach ($roles as $role) {
         $user_roles[] = '"' . $role->name . '"';
     }
     $student = Students::model()->findByAttributes(array('uid' => Yii::app()->user->id));
     $batch = Batches::model()->findByAttributes(array('id' => $student->batch_id));
     $criteria->condition .= '`file`<>:null AND (`placeholder`=:null OR `placeholder` IN (' . implode(',', $user_roles) . ')) AND ((`course` IS NULL) OR (`course`=:course) OR (`course`=0)) AND ((`batch` IS NULL) OR (`batch`=:batch) OR (`batch`=0))';
     $criteria->params = array(':null' => '', ':course' => $batch->course_id, ':batch' => $batch->id);
     $criteria->order = '`created_at` DESC';
     //print_r($criteria); exit;
     $files = FileUploads::model()->findAll($criteria);
     if (isset($_POST['Downfiles'])) {
         $selected_files = $_POST['Downfiles'];
         $slfiles = array();
         foreach ($selected_files as $s_file) {
             $model = FileUploads::model()->findByPk($s_file);
             if ($model != NULL) {
                 $slfiles[] = 'uploads/shared/' . $model->id . '/' . $model->file;
             }
         }
         $zip = Yii::app()->zip;
         $fName = $this->generateRandomString(rand(10, 20)) . '.zip';
         $zipFile = 'compressed/' . $fName;
         if ($zip->makeZip($slfiles, $zipFile)) {
             $fcon = file_get_contents($zipFile);
             header('Content-type:text/plain');
             header('Content-disposition:attachment; filename=' . $fName);
             header('Pragma:no-cache');
             echo $fcon;
             unlink($zipFile);
         } else {
             Yii::app()->user->setFlash('success', 'Can\'t download');
         }
     }
     $this->render('/fileUploads/index', array('files' => $files));
 }
开发者ID:akilraj1255,项目名称:rajeshwari,代码行数:47,代码来源:StudentsController.php


示例6: getweek

	border-top:1px #CCC solid;
	margin:30px 0px;
	font-size:9px;
	border-right:1px #CCC solid;
}
.attendance_table td{
	border-left:1px #CCC solid;
	padding:5px 6px;
	border-bottom:1px #CCC solid;
	
}
</style>
<div class="atnd_Con"  style="padding-left:20px; padding-top:30px;">
<?php 
$student = Students::model()->findByAttributes(array('id' => $_REQUEST['id']));
$batch = Batches::model()->findByAttributes(array('id' => $student->batch_id));
$course_id = $batch->course_id;
$course = Courses::model()->findByAttributes(array('id' => $course_id));
?>
    
<?php 
function getweek($date, $month, $year)
{
    $date = mktime(0, 0, 0, $month, $date, $year);
    $week = date('w', $date);
    switch ($week) {
        case 0:
            return 'S<br>';
            break;
        case 1:
            return 'M<br>';
开发者ID:akilraj1255,项目名称:rajeshwari,代码行数:31,代码来源:attentstud.php


示例7: edit_batch

 public function edit_batch($id)
 {
     $batch = Batches::getBatch($id);
     $data['batch'] = $batch[0];
     $data['title'] = "Stock Management::Edit Stock Entry";
     $data['content_view'] = "add_batch_view";
     $this->base_params($data);
 }
开发者ID:EuniceManyasi,项目名称:DVI,代码行数:8,代码来源:batch_management.php


示例8: actionDelete

 /**
  * Deletes a particular model.
  * If deletion is successful, the browser will be redirected to the 'admin' page.
  * @param integer $id the ID of the model to be deleted
  */
 public function actionDelete($id)
 {
     if (Yii::app()->request->isPostRequest) {
         $model = ExamScores::model()->findByAttributes(array('id' => $id));
         $student = Students::model()->findByAttributes(array('id' => $model->student_id));
         $student_name = ucfirst($student->first_name) . ' ' . ucfirst($student->middle_name) . ' ' . ucfirst($student->last_name);
         $exam = Exams::model()->findByAttributes(array('id' => $model->exam_id));
         $subject_name = Subjects::model()->findByAttributes(array('id' => $exam->subject_id));
         $examgroup = ExamGroups::model()->findByAttributes(array('id' => $exam->exam_group_id));
         $batch = Batches::model()->findByAttributes(array('id' => $examgroup->batch_id));
         $exam_name = ucfirst($subject_name->name) . ' - ' . ucfirst($examgroup->name) . ' (' . ucfirst($batch->name) . '-' . ucfirst($batch->course123->course_name) . ')';
         $goal_name = $student_name . ' for the exam ' . $exam_name;
         // we only allow deletion via POST request
         $this->loadModel($id)->delete();
         //Adding activity to feed via saveFeed($initiator_id,$activity_type,$goal_id,$goal_name,$field_name,$initial_field_value,$new_field_value)
         ActivityFeed::model()->saveFeed(Yii::app()->user->Id, '22', $model->id, $goal_name, NULL, NULL, NULL);
         // we only allow deletion via POST request
         //$this->loadModel($id)->delete();
         // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
         if (!isset($_GET['ajax'])) {
             $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));
         }
     } else {
         throw new CHttpException(400, 'Invalid request. Please do not repeat this request again.');
     }
 }
开发者ID:akilraj1255,项目名称:rajeshwari,代码行数:31,代码来源:ExamScoresController.php


示例9:

///JSON2JS
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js_plugins/json2/json2.js');
//jqueryform js
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js_plugins/ajaxform/jquery.form.js', CClientScript::POS_HEAD);
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js_plugins/ajaxform/form_ajax_binding.js', CClientScript::POS_HEAD);
Yii::app()->clientScript->registerCssFile(Yii::app()->baseUrl . '/js_plugins/ajaxform/client_val_form.css', 'screen');
?>
<div class="emp_cont_left">
    <div class="empleftbx">
    <div class="empimgbx">
    <ul>
           <?php 
if (isset($_REQUEST['id'])) {
    ?>
           <?php 
    $batch = Batches::model()->findByAttributes(array('id' => $_REQUEST['id']));
    ?>
           <?php 
    if ($batch != NULL) {
        ?>
    
    <li class="img_text">
    	<?php 
        echo '<strong>' . Yii::t('Batch', 'Batch:  ') . '</strong>';
        echo $batch->name;
        ?>
<br>
        <span><strong><?php 
        echo Yii::t('Batch', 'Course:');
        ?>
</strong>
开发者ID:SoftScape,项目名称:open-school-CE,代码行数:31,代码来源:left_side.php


示例10: array

    ?>
                                            </li>
                                            <li>
                                            <?php 
    echo CHtml::link('<span>' . Yii::t('weekdays', 'Set Class Timings') . '</span>', array('/courses/classTiming', 'id' => $_REQUEST['id']), array('class' => 'addbttn last'));
    ?>
                                            </li>
                                        </ul>
                                    <div class="clear"></div>
                                    </div> <!-- END div class="edit_bttns" -->
                                </div> <!-- END div class="c_subbutCon" -->
                            
                                <div  style="width:100%">
                                    <div>
										<?php 
    $times = Batches::model()->findAll("id=:x", array(':x' => $_REQUEST['id']));
    $weekdays = Weekdays::model()->findAll("batch_id=:x", array(':x' => $_REQUEST['id']));
    if (count($weekdays) == 0) {
        $weekdays = Weekdays::model()->findAll("batch_id IS NULL");
    }
    ?>
 <br /><br />
                                        <?php 
    $criteria = new CDbCriteria(array("order" => "STR_TO_DATE(start_time,'%h:%i%p') ASC"));
    $criteria->addCondition('batch_id=:x');
    $criteria->params = array(':x' => $_REQUEST['id']);
    $timing = ClassTimings::model()->findAll($criteria);
    $count_timing = count($timing);
    if ($timing != NULL) {
        ?>
                                        	<div style="position:absolute; top:13px; left:0px; width:240px; height:35px;"> 
开发者ID:akilraj1255,项目名称:rajeshwari,代码行数:31,代码来源:timetable.php


示例11: array

        } else {
            echo $list_2->admission_date;
        }
        ?>
&nbsp;</td>
                    <td align="center"><?php 
        echo CHtml::link($list_2->first_name . '  ' . $list_2->middle_name . '  ' . $list_2->last_name, array('/students/students/view', 'id' => $list_2->id));
        ?>
&nbsp;</td>
                    <td align="center"><?php 
        echo $list_2->admission_no;
        ?>
</td>
                    <td align="center">
                    <?php 
        $batc = Batches::model()->findByAttributes(array('id' => $list_2->batch_id));
        if ($batc != NULL) {
            $cours = Courses::model()->findByAttributes(array('id' => $batc->course_id));
            ?>
						  <?php 
            echo $cours->course_name . ' / ' . $batc->name;
            ?>
 
					  <?php 
        } else {
            ?>
 - <?php 
        }
        ?>
                      </td>
                    <td align="center">
开发者ID:akilraj1255,项目名称:rajeshwari,代码行数:31,代码来源:index.php


示例12: actionStudentmonthlypdf

 public function actionStudentmonthlypdf()
 {
     $batch_name = Batches::model()->findByAttributes(array('id' => $_REQUEST['id']));
     $pdf_name = ucfirst($batch_name->name) . ' Students Monthly Attendance Report ' . $_REQUEST['month'] . '.pdf';
     # HTML2PDF has very similar syntax
     $html2pdf = Yii::app()->ePdf->HTML2PDF();
     $html2pdf->WriteHTML($this->renderPartial('studentmonthlypdf', array(), true));
     $html2pdf->Output($pdf_name);
 }
开发者ID:akilraj1255,项目名称:rajeshwari,代码行数:9,代码来源:DefaultController.php


示例13: get

    public function get($year, $vaccine)
    {
        $receipts = Batches::getYearlyReceipts($year, $vaccine);
        $plans = Provisional_Plan::getYearlyPlan($year, $vaccine);
        $month_margins = array(0, 31, 60, 90, 121, 151, 182, 213, 243, 274, 304, 335, 366);
        $chart = '
<chart palette="2" caption="Provisional Plan" subcaption="For the year ' . $year . '" xAxisName="Date" yAxisName="Quantity"  showValues="0" alternateHGridColor="FCB541" alternateHGridAlpha="20" divLineColor="FCB541" divLineAlpha="50" canvasBorderColor="666666" baseFontColor="666666" lineColor="FCB541" xAxisMaxValue="366" xAxisMinValue="0">
<categories verticalLineColor="666666" verticalLineThickness="1">
<category label="Jan" x="0" showVerticalLine="1"/>
<category label="Feb" x="31" showVerticalLine="1"/>
<category label="Mar" x="60" showVerticalLine="1"/>
<category label="Apr" x="90" showVerticalLine="1"/>
<category label="May" x="121" showVerticalLine="1"/>
<category label="Jun" x="151" showVerticalLine="1"/>
<category label="Jul" x="182" showVerticalLine="1"/>
<category label="Aug" x="213" showVerticalLine="1"/>
<category label="Sep" x="243" showVerticalLine="1"/>
<category label="Oct" x="274" showVerticalLine="1"/>
<category label="Nov" x="304" showVerticalLine="1"/>
<category label="Dec" x="335" showVerticalLine="1"/>
<category label="Jan" x="366" showVerticalLine="1"/>
</categories> 
<dataSet seriesName="Planned Arrivals" color="009900" anchorSides="3" anchorRadius="7" anchorBgColor="D5FFD5" anchorBorderColor="009900">';
        foreach ($plans as $plan) {
            $date = $plan->expected_date;
            $quantity = $plan->expected_amount;
            $split_date = explode("/", $date);
            $month = $split_date[0] - 1;
            $month_delimiter = $month_margins[$month];
            $day = $split_date[1];
            $x_axis_value = $month_delimiter + $day;
            $chart .= '<set y="' . $quantity . '" x="' . $x_axis_value . '" toolText="' . $quantity . " Expected on " . $date . '"/>';
        }
        $chart .= '
</dataSet>
 
<dataSet seriesName="Actual Arrivals" color="0000FF" anchorSides="7" anchorRadius="7" anchorBgColor="C6C6FF" anchorBorderColor="0000FF">';
        foreach ($receipts as $receipt) {
            $date = $receipt->Arrival_Date;
            $quantity = $receipt->Total;
            $split_date = explode("/", $date);
            $month = $split_date[0] - 1;
            $month_delimiter = $month_margins[$month];
            $day = $split_date[1];
            $x_axis_value = $month_delimiter + $day;
            $chart .= '<set y="' . $quantity . '" x="' . $x_axis_value . '" toolText="' . $quantity . " (Batch No. " . $receipt->Batch_Number . ") Arrived on " . $date . '"/>';
        }
        $chart .= '
</dataSet>
<styles>
<definition>
<style name="Anim1" type="animation" param="_xscale" start="0" duration="1"/>
<style name="Anim2" type="animation" param="_alpha" start="0" duration="0.6"/>
<style name="DataShadow" type="Shadow" alpha="40"/>
</definition>
<application>
<apply toObject="DIVLINES" styles="Anim1"/>
<apply toObject="HGRID" styles="Anim2"/>
<apply toObject="DATALABELS" styles="DataShadow,Anim2"/>
</application>
</styles>
</chart>
';
        echo $chart;
    }
开发者ID:EuniceManyasi,项目名称:DVI,代码行数:65,代码来源:plan_comparison.php


示例14: actionAjax_Create

 public function actionAjax_Create()
 {
     if (isset($_POST['FinanceFeeCategories'])) {
         //$model=new FinanceFeeCategories;
         //set the submitted values
         $model->attributes = $_POST['FinanceFeeCategories'];
         $list = $_POST['FinanceFeeCategories'];
         $count = sizeof($list['batch_id']);
         for ($i = 0; $i < $count; $i++) {
             $batch = Batches::model()->findByAttributes(array('id' => $list['batch_id'][$i]));
             $course = Courses::model()->findByAttributes(array('id' => $batch->course_id));
             $model = new FinanceFeeCategories();
             $model->name = $list['name'];
             $model->description = $list['name'] . ' for ' . $batch->name . '( ' . $course->course_name . ') ' . $list['description'];
             $model->batch_id = $list['batch_id'][$i];
             $model->is_deleted = $list['is_deleted'];
             $model->is_master = $list['is_master'];
             $model->created_at = $list['created_at'];
             $model->updated_at = $list['updated_at'];
             $model->save();
         }
         echo json_encode(array('success' => true));
         exit;
     }
 }
开发者ID:akilraj1255,项目名称:rajeshwari,代码行数:25,代码来源:FinanceFeeCategoriesController.php


示例15: actionDeactivate

 public function actionDeactivate($id)
 {
     $model = Courses::model()->findByPk($id);
     $model->is_deleted = 1;
     if ($model->save()) {
         // Batch Deletion
         $batches = Batches::model()->findAllByAttributes(array('course_id' => $id));
         //Selecting all batches under the course with id = $id
         foreach ($batches as $batch) {
             // Student Deletion
             $students = Students::model()->findAllByAttributes(array('batch_id' => $batch->id));
             foreach ($students as $student) {
                 //Making student user inactive
                 if ($student->uid != NULL and $student->uid != 0) {
                     $student_user = User::model()->findByAttributes(array('id' => $student->uid));
                     if ($student_user != NULL) {
                         $student_user->saveAttributes(array('status' => '0'));
                     }
                 }
                 //Making parent user inactive
                 $parent = Guardians::model()->findByAttributes(array('ward_id' => $student->id));
                 if ($parent->uid != NULL and $parent->uid != 0) {
                     $parent_user = User::model()->findByAttributes(array('id' => $parent->uid));
                     if ($parent_user != NULL) {
                         $parent_user->saveAttributes(array('status' => '0'));
                     }
                 }
                 $student->saveAttributes(array('is_active' => '0', 'is_deleted' => '1'));
                 // Student Deleted
             }
             // Subject Association Deletion
             $subjects = Subjects::model()->findAllByAttributes(array('batch_id' => $batch->id));
             foreach ($subjects as $subject) {
                 EmployeesSubjects::model()->DeleteAllByAttributes(array('subject_id' => $subject->id));
                 $subject->delete();
             }
             // Exam Group Deletion
             $examgroups = ExamGroups::model()->findAllByAttributes(array('batch_id' => $batch->id));
             foreach ($examgroups as $examgroup) {
                 // Exams Deletion
                 $exams = Exams::model()->findAllByAttributes(array('exam_group_id' => $examgroup->id));
                 foreach ($exams as $exam) {
                     //Exam Score Deletion
                     $examscores = ExamScores::model()->DeleteAllByAttributes(array('exam_id' => $exam->id));
                     $exam->delete();
                     //Exam Deleted
                 }
                 $examgroup->delete();
                 //Exam Group Deleted
             }
             //Fee Collection Deletion
             $collections = FinanceFeeCollections::model()->findAllByAttributes(array('batch_id' => $batch->id));
             foreach ($collections as $collection) {
                 // Finance Fees Deletion
                 $student_fees = FinanceFees::model()->DeleteAllByAttributes(array('fee_collection_id' => $collection->id));
                 $transaction = FinanceTransaction::model()->DeleteAllByAttributes(array('collection_id' => $collection->id));
                 $collection->delete();
                 // Fee Collection Deleted
             }
             //Fee Category Deletion
             $categories = FinanceFeeCategories::model()->findAllByAttributes(array('batch_id' => $batch->id));
             foreach ($categories as $category) {
                 // Fee Particular Deletion
                 $particulars = FinanceFeeParticulars::model()->DeleteAllByAttributes(array('finance_fee_category_id' => $category->id));
                 $category->delete();
                 // Fee Category Deleted
             }
             //Timetable Entry Deletion
             $periods = TimetableEntries::model()->DeleteAllByAttributes(array('batch_id' => $batch->id));
             //Class Timings Deletion
             $class_timings = ClassTimings::model()->DeleteAllByAttributes(array('batch_id' => $batch->id));
             //Delete Weekdays
             $weekdays = Weekdays::model()->DeleteAllByAttributes(array('batch_id' => $batch->id));
             $batch->is_active = 0;
             $batch->is_deleted = 1;
             $batch->employee_id = ' ';
             $batch->save();
             // Batch Deleted
         }
         Yii::app()->user->setFlash('success', "Selected course is deleted!");
         $this->redirect(array('managecourse'));
     }
 }
开发者ID:akilraj1255,项目名称:rajeshwari,代码行数:83,代码来源:CoursesController.php


示例16: foreach

<?php 
    foreach ($posts as $posts_1) {
        ?>
<div class="mcbrow" id="jobDialog1">
	<ul>
    	<li class="gtcol1" onclick="details('<?php 
        echo $posts_1->id;
        ?>
');" style="cursor:pointer;">
       
		<?php 
        echo $posts_1->course_name;
        ?>
		<?php 
        $course = Courses::model()->findByAttributes(array('id' => $posts_1->id, 'is_deleted' => 0));
        $batch = Batches::model()->findAll("course_id=:x AND is_deleted=:y AND is_active=:z", array(':x' => $posts_1->id, ':y' => 0, ':z' => 1));
        ?>
        <span><?php 
        echo count($batch);
        ?>
 - Batch(es)</span>
        </li>
        <li class="col2">
        <?php 
        echo CHtml::ajaxLink(Yii::t('Courses', 'Edit'), $this->createUrl('courses/Edit'), array('onclick' => '$("#jobDialog11").dialog("open"); return false;', 'update' => '#jobDialog1', 'type' => 'GET', 'data' => array('val1' => $posts_1->id), 'dataType' => 'text'), array('id' => 'showJobDialog123' . $posts_1->id, 'class' => 'edit'));
        ?>
        </li>
        <li class="col3"><?php 
        echo CHtml::link(Yii::t('Courses', 'Delete'), array('deactivate', 'id' => $posts_1->id), array('confirm' => "Are you sure?\n\n Note: All details (batches, students, timetable, fees, exam) related to this course will be deleted.", 'class' => 'delete'));
        ?>
</li>
开发者ID:SoftScape,项目名称:open-school-CE,代码行数:31,代码来源:managecourse.php


示例17: array

    
    </td>
    <td valign="top">
    <div class="cont_right formWrapper">
    <h1><?php 
echo Yii::t('fees', 'Fees Collection');
?>
</h1>
    <div class="formCon" style="padding:3px;">
    <div class="formConInner" style="padding:3px 10px;">
    <table width="80%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>

    <?php 
$data = CHtml::listData(Batches::model()->findAll("is_active=:x and is_deleted=:y ORDER BY start_date DESC", array(':x' => 1, ':y' => 0)), 'id', 'coursename');
if (isset($_REQUEST['batch'])) {
    $sel = $_REQUEST['batch'];
} else {
    $sel = '';
}
echo '<span style="font-size:14px; font-weight:bold; color:#666;">' . Yii::t('fees', 'Batch') . '</span>&nbsp;&nbsp;&nbsp;&nbsp;';
echo CHtml::dropDownList('id', '', $data, array('prompt' => 'Select', 'onchange' => 'batch()', 'id' => 'batch', 'options' => array($sel => array('selected' => true))));
echo '</td><td style="padding-top:13px;">';
?>

<?php 
$data_1 = array();
if (isset($_REQUEST['batch'])) {
    $data_1 = CHtml::listData(FinanceFeeCollections::model()->findAll("batch_id=:x", array(':x' => $_REQUEST['batch'])), 'id', 'name');
}
开发者ID:akilraj1255,项目名称:rajeshwari,代码行数:30,代码来源:index.php


示例18: foreach

                        <td align="center"><?php 
    echo Yii::t('Courses', 'Batch Name');
    ?>
</td>
                        <td align="center"><?php 
    echo Yii::t('Courses', 'Class Teacher');
    ?>
</td>
                        <td align="center"><?php 
    echo Yii::t('Courses', 'Actions');
    ?>
</td>
                    </tr>
                    <?php 
    foreach ($batches_id as $batch_id) {
        $batch = Batches::model()->findByAttributes(array('id' => $batch_id->batch_id, 'is_active' => 1, 'is_deleted' => 0));
        echo '<tr id="batchrow' . $batch->id . '">';
        /*echo '<td style="text-align:center; padding-left:10px; font-weight:bold;">'.CHtml::link($batch->name, array('/teachersportal/default/employeetimetable','id'=>$batch->id)).'</td>';*/
        echo '<td style="text-align:center; padding-left:10px; font-weight:bold;">' . $batch->coursename . '</td>';
        $teacher = Employees::model()->findByAttributes(array('id' => $batch->employee_id));
        echo '<td align="center">';
        if ($teacher) {
            echo $teacher->first_name . ' ' . $teacher->last_name;
        } else {
            echo '-';
        }
        // Count if any exam timetables are published in a batch.
        $exams_published = ExamGroups::model()->countByAttributes(array('batch_id' => $batch->id, 'is_published' => 1));
        // Count if any exam results are published in a batch.
        $result_published = ExamGroups::model()->countByAttributes(array('batch_id' => $batch->id, 'result_published' => 1));
        echo '<td align="center">';
开发者ID:akilraj1255,项目名称:rajeshwari,代码行数:31,代码来源:allexam.php


示例19: array

            ?>
										<?php 
            echo CHtml::checkBoxList('sid', '', $posts1, array('id' => '1', 'template' => '{input}{label}</tr><tr><td width="10%">', 'checkAll' => 'All'));
            ?>
                                        
                                        </td>
                                        <td colspan="2">
                                        
                                        </td>
                                        </tr>
						
                            
                    </table>
                    
                    <?php 
            $data1 = CHtml::listData(Batches::model()->findAll(array('order' => 'name DESC')), 'id', 'name');
            echo CHtml::dropDownList('batch_id', '', $data1, array('prompt' => 'Select', 'id' => 'batch_id'));
            ?>
                    
                    <?php 
            echo CHtml::submitButton(Yii::t('Batch', 'Promote'), array('name' => 'promote', 'onclick' => 'formSubmit()', 'class' => ''));
            ?>
                    
                   
                    
                <?php 
        } else {
            echo '<br><div class="notifications nt_red" style="padding-top:10px">' . Yii::t('Batch', '<i>No Active Students In This Batch</i>') . '</div>';
        }
    }
    ?>
开发者ID:SoftScape,项目名称:open-school-CE,代码行数:31,代码来源:promote_popup.php


示例20:

?>
</td>
    <td><?php 
echo $model->name;
?>
</td>
  </tr>
    <tr>
    <td><?php 
echo Yii::t('Electives', 'Subject Code');
?>
</td>
    <td><?php 
echo $model->code;
?>
</td>
  </tr>
    <tr>
    <td><?php 
echo Yii::t('Electives', 'Batch Name');
?>
</td>
    <td><?php 
$posts = Batches::model()->findByAttributes(array('id' => $model->batch_id));
echo $posts->name;
?>
</td>
  </tr>
   
</table>
</div>
开发者ID:akilraj1255,项目名称:rajeshwari,代码行数:31,代码来源:view.php



注:本文中的Batches类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP BeanFactory类代码示例发布时间:2022-05-23
下一篇:
PHP BatchJobPeer类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap