当前位置: 首页>>代码示例>>PHP>>正文


PHP Quota::model方法代码示例

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


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

示例1: getAllQuota

 public static function getAllQuota()
 {
     $Data = Quota::model()->findAll();
     $res = array();
     foreach ($Data as $record) {
         $res[$record->idQuota] = $record->QuotaName;
     }
     return $res;
 }
开发者ID:upmunspel,项目名称:abiturient,代码行数:9,代码来源:Quota.php

示例2: deleteQuota

 function deleteQuota($condition = false, $recursive = true)
 {
     if ($recursive == true) {
         $oResult = Quota::model()->findAllByAttributes($condition);
         foreach ($oResult as $aRow) {
             Quota_languagesettings::model()->deleteAllByAttributes(array('quotals_quota_id' => $aRow['id']));
             Quota_members::model()->deleteAllByAttributes(array('quota_id' => $aRow['id']));
         }
     }
     Quota::model()->deleteAllByAttributes($condition);
 }
开发者ID:pmaonline,项目名称:limesurvey-quickstart,代码行数:11,代码来源:Quota.php

示例3: Category

$StudentInfo = StudentInfo::model()->findByPk($student_transaction[0]->student_transaction_student_id);
$AcademicTermPeriod = AcademicTermPeriod::model()->findByPk($student_transaction[0]->student_academic_term_period_tran_id);
$AcademicTerm = AcademicTerm::model()->findByPk($student_transaction[0]->student_academic_term_name_id);
if ($student_transaction[0]->student_transaction_category_id != null) {
    $Category = Category::model()->findByPk($student_transaction[0]->student_transaction_category_id);
} else {
    $Category = new Category();
}
if ($student_transaction[0]->student_transaction_category_id != null) {
    $Nationality = Nationality::model()->findByPk($student_transaction[0]->student_transaction_nationality_id);
} else {
    $Nationality = new Nationality();
}
if ($student_transaction[0]->student_transaction_quota_id != null) {
    $Quota = Quota::model()->findByPk($student_transaction[0]->student_transaction_quota_id);
} else {
    $Quota = new Quota();
}
if ($student_transaction[0]->student_transaction_religion_id != null) {
    $Religion = Religion::model()->findByPk($student_transaction[0]->student_transaction_religion_id);
} else {
    $Religion = new Religion();
}
$Branch = Branch::model()->findByPk($student_transaction[0]->student_transaction_branch_id);
$Shift = Shift::model()->findByPk($student_transaction[0]->student_transaction_shift_id);
$Division = Division::model()->findByPk($student_transaction[0]->student_transaction_division_id);
$Batch = Batch::model()->findByPk($student_transaction[0]->student_transaction_batch_id);
$Organization = Organization::model()->findByPk($student_transaction[0]->student_transaction_organization_id);
if ($student_transaction[0]->student_transaction_languages_known_id != null) {
    $LanguagesKnown = LanguagesKnown::model()->findByPk($student_transaction[0]->student_transaction_languages_known_id);
开发者ID:sharmarakesh,项目名称:edusec-college-management-system,代码行数:30,代码来源:studentfinalview.php

示例4: explode

	if(Yii::app()->controller->action->id=="certiview")
	{
		$certi= StudentCertificateDetailsTable::model()->find(array('condition'=>' 	student_certificate_details_table_student_id='.$trans->student_transaction_id.' and student_certificate_type_id='.$certificate_type,'order'=>'student_certificate_details_table_id desc'));
		$ref_no = $certi->certificate_reference_number;
	}		
	else{
	$certi = StudentCertificateDetailsTable::model()->find(array('order'=>'student_certificate_details_table_id desc'));
	$autonum = 0;
	if(!empty($certi) && $certi->certificate_reference_number!=""){
	$arr = explode('/',$certi->certificate_reference_number);
	$autonum = $arr[3];
	}
	$autonum +=1;
	$ref_no = $year."/".$branch_model->branch_code."/".date('Y').'/'.$autonum;
	}
	$quota = "<b>".Quota::model()->findByPk($trans->student_transaction_quota_id)->quota_name."</b>";
	$content = Certificate::model()->findByPk($model->certificatetype)->certificate_content;
	
	$content = str_replace('{title}',$titl,$content);
	$content = str_replace('{name}',$name,$content);
	$content = str_replace('{branch}',$branch,$content);
	$content = str_replace('{sem}',$sem,$content);	
	$content = str_replace('{division}',$div,$content);
	$content = str_replace('{enrollment}',$en_no,$content);
	$content = str_replace('{gender}',$gender,$content);
	$content = str_replace('{category}',$category,$content);
	$content = str_replace('{quota}',$quota,$content);
	$content = str_replace('{smobile}',$smobile,$content);
	$content = str_replace('{pmobile}',$pmobile,$content);
	$content = str_replace('{date}',$cdate,$content);
	$content = str_replace('{line1}',$lin1,$content);
开发者ID:rinodung,项目名称:EduSec3.0.0,代码行数:31,代码来源:certificateWithheaderMulti.php

示例5: new_answer

 function new_answer($iSurveyId, $sSubAction = 'new_answer')
 {
     $iSurveyId = sanitize_int($iSurveyId);
     $this->_checkPermissions($iSurveyId, 'update');
     $aData = $this->_getData($iSurveyId);
     $sBaseLang = $aData['sBaseLang'];
     $aViewUrls = array();
     if (($sSubAction == "new_answer" || $sSubAction == "new_answer_two" && !isset($_POST['quota_qid'])) && Permission::model()->hasSurveyPermission($iSurveyId, 'quotas', 'create')) {
         $result = Quota::model()->findAllByPk(Yii::app()->request->getPost('quota_id'));
         foreach ($result as $aQuotaDetails) {
             $quota_name = $aQuotaDetails['name'];
         }
         $result = Question::model()->findAllByAttributes(array('type' => array('G', 'M', 'Y', 'A', 'B', 'I', 'L', 'O', '!'), 'sid' => $iSurveyId, 'language' => $sBaseLang, 'parent_qid' => 0));
         if (empty($result)) {
             $aViewUrls[] = 'newanswererror_view';
         } else {
             $aData['newanswer_result'] = $result;
             $aData['quota_name'] = $quota_name;
             $aViewUrls[] = 'newanswer_view';
         }
     }
     if ($sSubAction == "new_answer_two" && isset($_POST['quota_qid']) && Permission::model()->hasSurveyPermission($iSurveyId, 'quotas', 'create')) {
         $aResults = Quota::model()->findByPk(Yii::app()->request->getPost('quota_qid'));
         $sQuotaName = $aResults['name'];
         $aQuestionAnswers = self::getQuotaAnswers(Yii::app()->request->getPost('quota_qid'), $iSurveyId, Yii::app()->request->getPost('quota_id'));
         $x = 0;
         foreach ($aQuestionAnswers as $aQACheck) {
             if (isset($aQACheck['rowexists'])) {
                 $x++;
             }
         }
         reset($aQuestionAnswers);
         $aData['question_answers'] = $aQuestionAnswers;
         $aData['x'] = $x;
         $aData['quota_name'] = $sQuotaName;
         $aViewUrls[] = 'newanswertwo_view';
     }
     $aData['sidemenu']['state'] = false;
     $surveyinfo = Survey::model()->findByPk($iSurveyId)->surveyinfo;
     $aData['title_bar']['title'] = $surveyinfo['surveyls_title'] . "(" . gT("ID") . ":" . $iSurveyId . ")";
     $aData['surveybar']['savebutton']['form'] = 'frmeditgroup';
     $aData['surveybar']['closebutton']['url'] = 'admin/quotas/sa/index/surveyid/' . $iSurveyId;
     // Close button
     $this->_renderWrappedTemplate('quotas', $aViewUrls, $aData);
 }
开发者ID:joaocc,项目名称:LimeSurvey--LimeSurvey,代码行数:45,代码来源:quotas.php

示例6: array

        $label = null;
        $field_value = null;
        ?>
	<!--Content div-->
	<div class="front_content">
		<div class="contentpic">
			<?php 
        echo CHtml::image(Yii::app()->baseUrl . "/college_data/stud_images/" . $studphoto, "no-images", array("width" => "60px", "height" => "60px"));
        ?>
		</div>
		<div class="contentinfo">
		
		<?php 
        foreach ($selected_list as $key => $value) {
            if ($key == 'quota_name') {
                $field_value = Quota::model()->findByPk($stud['student_transaction_quota_id'])->quota_name;
            } else {
                if ($key == 'branch_name') {
                    $field_value = Branch::model()->findByPk($stud['student_transaction_branch_id'])->branch_name;
                } else {
                    if ($key == 'division_code') {
                        $field_value = Division::model()->findByPk($stud['student_transaction_division_id'])->{$key};
                    } else {
                        if ($key == 'sem') {
                            $field_value = AcademicTerm::model()->findByPk($stud['student_academic_term_name_id'])->academic_term_name;
                        } else {
                            if ($key == 'student_first_name') {
                                $lname = $StudentInfo->student_last_name;
                                $fname = $StudentInfo->student_first_name;
                                $mname = $StudentInfo->student_middle_name;
                                $label = $value;
开发者ID:sharmarakesh,项目名称:EduSec2.0.0,代码行数:31,代码来源:print_idcard.php

示例7: array

		</td>

		<td>
			<?php 
    echo AcademicTermPeriod::model()->findByPk($i['fees_academic_term_id'])->academic_term_period;
    ?>
		</td>

		<td>
			<?php 
    echo AcademicTerm::model()->findByPk($i['fees_academic_term_name_id'])->academic_term_name;
    ?>
		</td>
		<td>
			<?php 
    echo Quota::model()->findByPk($i['fees_quota_id'])->quota_name;
    ?>
		</td>
		<td>

		<u>
			<?php 
    echo CHtml::link($numStud[$j], array('feesPaymentTransaction/total', 'branch_id' => $i['fees_branch_id'], 'acm_id' => $i['fees_academic_term_id'], 'acm_name_id' => $i['fees_academic_term_name_id'], 'quota' => $i['fees_quota_id']));
    ?>
</u>
		</td>
		<td>
		<u>
			<?php 
    echo CHtml::link($paid_stud_count[$j], array('feesPaymentTransaction/paid', 'branch_id' => $i['fees_branch_id'], 'acm_id' => $i['fees_academic_term_id'], 'acm_name_id' => $i['fees_academic_term_name_id'], 'quota' => $i['fees_quota_id']));
    ?>
开发者ID:sharmarakesh,项目名称:edusec-college-management-system,代码行数:31,代码来源:report_view.php

示例8: getQuotaInformation

/**
* getQuotaInformation() returns quota information for the current survey
* @param string $surveyid - Survey identification number
* @param string $quotaid - Optional quotaid that restricts the result to a given quota
* @return array - nested array, Quotas->Members->Fields
*/
function getQuotaInformation($surveyid, $language, $iQuotaID = 'all')
{
    global $clienttoken;
    $baselang = Survey::model()->findByPk($surveyid)->language;
    $aAttributes = array('sid' => $surveyid);
    if ($iQuotaID != 'all') {
        $aAttributes['id'] = $iQuotaID;
    }
    $result = Quota::model()->with(array('languagesettings' => array('condition' => "quotals_language='{$language}'")))->findAllByAttributes($aAttributes);
    $quota_info = array();
    $x = 0;
    $surveyinfo = getSurveyInfo($surveyid);
    // Check all quotas for the current survey
    //if ($result->RecordCount() > 0)
    if (count($result) > 0) {
        //while ($survey_quotas = $result->FetchRow())
        foreach ($result as $_survey_quotas) {
            $survey_quotas = $_survey_quotas->attributes;
            // !!! Doubting this
            foreach ($_survey_quotas->languagesettings[0] as $k => $v) {
                $survey_quotas[$k] = $v;
            }
            //Modify the URL - thanks janokary
            $survey_quotas['quotals_url'] = str_replace("{SAVEDID}", !empty(Yii::app()->session['srid']) ? Yii::app()->session['srid'] : '', $survey_quotas['quotals_url']);
            $survey_quotas['quotals_url'] = str_replace("{SID}", $surveyid, $survey_quotas['quotals_url']);
            $survey_quotas['quotals_url'] = str_replace("{LANG}", Yii::app()->lang->getlangcode(), $survey_quotas['quotals_url']);
            $survey_quotas['quotals_url'] = str_replace("{TOKEN}", $clienttoken, $survey_quotas['quotals_url']);
            array_push($quota_info, array('Name' => $survey_quotas['name'], 'Limit' => $survey_quotas['qlimit'], 'Action' => $survey_quotas['action'], 'Message' => $survey_quotas['quotals_message'], 'Url' => $survey_quotas['quotals_url'], 'UrlDescrip' => $survey_quotas['quotals_urldescrip'], 'AutoloadUrl' => $survey_quotas['autoload_url']));
            $result_qe = Quota_members::model()->findAllByAttributes(array('quota_id' => $survey_quotas['id']));
            $quota_info[$x]['members'] = array();
            if (count($result_qe) > 0) {
                foreach ($result_qe as $quota_entry) {
                    $quota_entry = $quota_entry->attributes;
                    $result_quest = Questions::model()->findByAttributes(array('qid' => $quota_entry['qid'], 'language' => $baselang));
                    $qtype = $result_quest->attributes;
                    $fieldnames = "0";
                    if ($qtype['type'] == "I" || $qtype['type'] == "G" || $qtype['type'] == "Y") {
                        $fieldnames = array(0 => $surveyid . 'X' . $qtype['gid'] . 'X' . $quota_entry['qid']);
                        $value = $quota_entry['code'];
                    }
                    if ($qtype['type'] == "L" || $qtype['type'] == "O" || $qtype['type'] == "!") {
                        $fieldnames = array(0 => $surveyid . 'X' . $qtype['gid'] . 'X' . $quota_entry['qid']);
                        $value = $quota_entry['code'];
                    }
                    if ($qtype['type'] == "M") {
                        $fieldnames = array(0 => $surveyid . 'X' . $qtype['gid'] . 'X' . $quota_entry['qid'] . $quota_entry['code']);
                        $value = "Y";
                    }
                    if ($qtype['type'] == "A" || $qtype['type'] == "B") {
                        $temp = explode('-', $quota_entry['code']);
                        $fieldnames = array(0 => $surveyid . 'X' . $qtype['gid'] . 'X' . $quota_entry['qid'] . $temp[0]);
                        $value = $temp[1];
                    }
                    array_push($quota_info[$x]['members'], array('Title' => $qtype['title'], 'type' => $qtype['type'], 'code' => $quota_entry['code'], 'value' => $value, 'qid' => $quota_entry['qid'], 'fieldnames' => $fieldnames));
                }
            }
            $x++;
        }
    }
    return $quota_info;
}
开发者ID:rawaludin,项目名称:LimeSurvey,代码行数:67,代码来源:common_helper.php

示例9: actionCreate

    /**
     * Creates a new model.
     * If creation is successful, the browser will be redirected to the 'view' page.
     */
    public function actionCreate()
    {
        $model = new FeesPaymentTransaction();
        $FeesMasterDetails = new FeesMaster();
        $total = 0;
        $result = $_REQUEST['id'];
        $fees_stru = Yii::app()->db->createCommand()->select('fees.fees_master_id , fees.fees_master_name , fees.fees_branch_id , stud.student_transaction_branch_id , stud.student_transaction_organization_id , fees.fees_organization_id , stud.student_transaction_quota_id , fees.fees_quota_id ,stud.student_academic_term_period_tran_id , fees.fees_academic_term_id, fees.fees_academic_term_name_id, fees.fees_master_total')->from('student_transaction stud')->join('fees_master fees', 'stud.student_transaction_branch_id = fees.fees_branch_id
		AND stud.student_academic_term_period_tran_id = fees.fees_academic_term_id
		AND stud.student_academic_term_name_id = fees.fees_academic_term_name_id 	
		AND stud.student_transaction_quota_id = fees.fees_quota_id')->where('stud.student_transaction_id=:id', array(':id' => $result))->queryRow();
        $student_fees = StudentFeesMaster::model()->findAll('fees_master_table_id = :fees_master_id AND student_fees_master_student_transaction_id = :student_id', array(':fees_master_id' => $fees_stru['fees_master_id'], ':student_id' => $result));
        //print_r($student_fees);  exit;
        foreach ($student_fees as $fees_data) {
            $total += $fees_data->fees_details_amount;
        }
        if (!$fees_stru) {
            $ourscript = "alert('No fees available for this critaria.. Please create fees with this branch, academic year and semester of student. \t');";
            Yii::app()->clientScript->registerScript('helloscript', $ourscript, CClientScript::POS_READY);
            $this->redirect(array('error', 'status' => 'nofees'));
        } else {
            $model->fees_payment_master_id = $fees_stru['fees_master_id'];
            $org = Organization::model()->findByPk($fees_stru['fees_organization_id']);
            $quota = Quota::model()->findByPk($fees_stru['fees_quota_id']);
            $branch = Branch::model()->findByPk($fees_stru['fees_branch_id']);
            $acmd = AcademicTermPeriod::model()->findByPk($fees_stru['fees_academic_term_id']);
            $acmd_name = AcademicTerm::model()->findByPk($fees_stru['fees_academic_term_name_id']);
            $FeesMasterDetails->fees_master_name = $fees_stru['fees_master_name'];
            $FeesMasterDetails->fees_organization_id = $org->organization_name;
            $FeesMasterDetails->fees_quota_id = $quota->quota_name;
            $FeesMasterDetails->fees_branch_id = $branch->branch_name;
            $FeesMasterDetails->fees_academic_term_id = $acmd->academic_term_period;
            $FeesMasterDetails->fees_academic_term_name_id = $acmd_name->academic_term_name;
            $FeesMasterDetails->fees_master_total = $total;
            $model->fees_payment_master_id = $fees_stru['fees_master_id'];
            $cash_model = new FeesPaymentTransaction('cashsearch');
            $cash_model->unsetAttributes();
            // clear any default values
            if (isset($_GET['FeesPaymentTransaction'])) {
                $cash_model->attributes = $_GET['FeesPaymentTransaction'];
            }
            $cheque_model = new FeesPaymentTransaction('chequesearch');
            $cheque_model->unsetAttributes();
            // clear any default values
            if (isset($_GET['FeesPaymentTransaction'])) {
                $cheque_model->attributes = $_GET['FeesPaymentTransaction'];
            }
            $this->render('create', array('model' => $model, 'FeesMasterDetails' => $FeesMasterDetails, 'cash_model' => $cash_model, 'cheque_model' => $cheque_model));
        }
    }
开发者ID:sharmarakesh,项目名称:edusec-college-management-system,代码行数:53,代码来源:FeesPaymentTransactionController.php

示例10: foreach

     }
 }
 echo "</tr>";
 $i = 1;
 $m = 1;
 foreach ($stud_data as $t => $sd) {
     if ($m % 2 == 0) {
         $class = "odd";
     } else {
         $class = "even";
     }
     echo "<tr class=" . $class . ">";
     echo "<td style='text-align:center;'>" . $i . "</td>";
     foreach ($selected_list as $s) {
         if ($s == 'quota_name') {
             echo "<td style='text-align:center;'>" . Quota::model()->findByPk($sd['student_transaction_quota_id'])->quota_name . "</td>";
         } else {
             if ($s == 'branch_name') {
                 echo "<td style='text-align:center;'>" . Branch::model()->findByPk($sd['student_transaction_branch_id'])->branch_name . "</td>";
             } else {
                 if ($s == 'division_code') {
                     echo "<td style='text-align:center;'>" . Division::model()->findByPk($sd['student_transaction_division_id'])->{$s} . "</td>";
                 } else {
                     if ($s == 'sem') {
                         echo "<td style='text-align:center;'>" . AcademicTerm::model()->findByPk($sd['student_academic_term_name_id'])->academic_term_name . "</td>";
                     } else {
                         if ($s == 'student_address_c_line1') {
                             if ($sd['student_transaction_student_address_id'] != 0) {
                                 echo "<td style='text-align:center;min-width:400px;'>" . StudentAddress::model()->findByPk($sd['student_transaction_student_address_id'])->student_address_c_line1 . " " . StudentAddress::model()->findByPk($sd['student_transaction_student_address_id'])->student_address_c_line2 . "</td>";
                             } else {
                                 echo "<td style='text-align:center;'>&nbsp;</td>";
开发者ID:sharmarakesh,项目名称:EduSec2.0.0,代码行数:31,代码来源:stud_report_view_ravi.php

示例11: array

<?php 
$org_id = Yii::app()->user->getState('org_id');
$data = Yii::app()->db->createCommand()->selectDistinct('fees.fees_student_id, stud.student_transaction_id,stud.student_transaction_student_id,stud.student_transaction_quota_id')->from('fees_payment_transaction fees')->join('student_transaction stud', 'fees.fees_student_id = stud.student_transaction_id')->where('stud.student_transaction_branch_id = :branch_id AND stud.student_transaction_quota_id =:quota_id AND stud.student_academic_term_period_tran_id = :acm_id AND fees.fees_academic_term_id = :acm_name_id AND stud.student_transaction_organization_id = :org_id', array(':branch_id' => $_REQUEST['branch_id'], ':acm_id' => $_REQUEST['acm_id'], ':acm_name_id' => $_REQUEST['acm_name_id'], ':org_id' => $org_id, ':quota_id' => $_REQUEST['quota']))->queryAll();
echo "<h2 align='center'>Branch : " . Branch::model()->findByPk($_REQUEST['branch_id'])->branch_name . "(" . Quota::model()->findByPk($_REQUEST['quota'])->quota_name . ")<br/>";
echo "Semester: " . AcademicTerm::model()->findByPk($_REQUEST['acm_name_id'])->academic_term_name . "(" . AcademicTermPeriod::model()->findByPk($_REQUEST['acm_id'])->academic_term_period . ")" . "</h2>";
$fees_master = FeesMaster::model()->findByAttributes(array('fees_quota_id' => $_REQUEST['quota'], 'fees_branch_id' => $_REQUEST['branch_id'], 'fees_academic_term_name_id' => $_REQUEST['acm_name_id']));
$fees_masterid = $fees_master->fees_master_id;
if ($data) {
    ?>

<table class="table_data" border="1">
<tr class="table_header">
	<th>SI.No.</th>
	<th>Enroll No.</th>
	<th>Roll No.</th>
	<th>Name</th>
	<th>Payable Amount</th>
	<th>Paid Amount</th>
	<th>Outstanding</th>
</tr>
<?php 
    $i = 0;
    $m = 1;
    $grandpayable = 0;
    $grandpaidtotal = 0;
    $grandoutstandtotal = 0;
    foreach ($data as $info) {
        if ($m % 2 == 0) {
            $class = "odd";
        } else {
开发者ID:sharmarakesh,项目名称:edusec-college-management-system,代码行数:30,代码来源:paid_student_pdf.php

示例12: _checkintegrity

 /**
  * This function checks the LimeSurvey database for logical consistency and returns an according array
  * containing all issues in the particular tables.
  * @returns Array with all found issues.
  */
 protected function _checkintegrity()
 {
     $clang = Yii::app()->lang;
     /*** Plainly delete survey permissions if the survey or user does not exist ***/
     $users = User::model()->findAll();
     $uids = array();
     foreach ($users as $user) {
         $uids[] = $user['uid'];
     }
     $oCriteria = new CDbCriteria();
     $oCriteria->addNotInCondition('uid', $uids, 'OR');
     $surveys = Survey::model()->findAll();
     $sids = array();
     foreach ($surveys as $survey) {
         $sids[] = $survey['sid'];
     }
     $oCriteria->addNotInCondition('entity_id', $sids, 'OR');
     $oCriteria->addCondition("entity='survey'");
     Permission::model()->deleteAll($oCriteria);
     // Deactivate surveys that have a missing response table
     foreach ($surveys as $survey) {
         if ($survey['active'] == 'Y' && !tableExists("{{survey_{$survey['sid']}}}")) {
             Survey::model()->updateByPk($survey['sid'], array('active' => 'N'));
         }
     }
     unset($surveys);
     // Fix subquestions
     fixSubquestions();
     /*** Check for active survey tables with missing survey entry and rename them ***/
     $sDBPrefix = Yii::app()->db->tablePrefix;
     $sQuery = dbSelectTablesLike('{{survey}}\\_%');
     $aResult = dbQueryOrFalse($sQuery);
     foreach ($aResult->readAll() as $aRow) {
         $sTableName = substr(reset($aRow), strlen($sDBPrefix));
         if ($sTableName == 'survey_links' || $sTableName == 'survey_url_parameters') {
             continue;
         }
         $aTableName = explode('_', $sTableName);
         if (isset($aTableName[1]) && ctype_digit($aTableName[1])) {
             $iSurveyID = $aTableName[1];
             if (!in_array($iSurveyID, $sids)) {
                 $sDate = date('YmdHis') . rand(1, 1000);
                 $sOldTable = "survey_{$iSurveyID}";
                 $sNewTable = "old_survey_{$iSurveyID}_{$sDate}";
                 try {
                     $deactivateresult = Yii::app()->db->createCommand()->renameTable("{{{$sOldTable}}}", "{{{$sNewTable}}}");
                 } catch (CDbException $e) {
                     die('Couldn\'t make backup of the survey table. Please try again. The database reported the following error:<br />' . htmlspecialchars($e) . '<br />');
                 }
             }
         }
     }
     /*** Check for active token tables with missing survey entry ***/
     $aResult = dbQueryOrFalse(dbSelectTablesLike('{{tokens}}\\_%'));
     foreach ($aResult->readAll() as $aRow) {
         $sTableName = substr(reset($aRow), strlen($sDBPrefix));
         $iSurveyID = substr($sTableName, strpos($sTableName, '_') + 1);
         if (!in_array($iSurveyID, $sids)) {
             $sDate = date('YmdHis') . rand(1, 1000);
             $sOldTable = "tokens_{$iSurveyID}";
             $sNewTable = "old_tokens_{$iSurveyID}_{$sDate}";
             try {
                 $deactivateresult = Yii::app()->db->createCommand()->renameTable("{{{$sOldTable}}}", "{{{$sNewTable}}}");
             } catch (CDbException $e) {
                 die('Couldn\'t make backup of the survey table. Please try again. The database reported the following error:<br />' . htmlspecialchars($e) . '<br />');
             }
         }
     }
     /**********************************************************************/
     /*     Check conditions                                               */
     /**********************************************************************/
     $okQuestion = array();
     $sQuery = 'SELECT cqid,cid,cfieldname FROM {{conditions}}';
     $aConditions = Yii::app()->db->createCommand($sQuery)->queryAll();
     foreach ($aConditions as $condition) {
         if ($condition['cqid'] != 0) {
             // skip case with cqid=0 for codnitions on {TOKEN:EMAIL} for instance
             if (!array_key_exists($condition['cqid'], $okQuestion)) {
                 $iRowCount = Question::model()->countByAttributes(array('qid' => $condition['cqid']));
                 if (Question::model()->hasErrors()) {
                     safeDie(Question::model()->getError());
                 }
                 if (!$iRowCount) {
                     $aDelete['conditions'][] = array('cid' => $condition['cid'], 'reason' => $clang->gT('No matching CQID'));
                 } else {
                     $okQuestion[$condition['cqid']] = $condition['cqid'];
                 }
             }
         }
         if ($condition['cfieldname']) {
             if (preg_match('/^\\+{0,1}[0-9]+X[0-9]+X*$/', $condition['cfieldname'])) {
                 // only if cfieldname isn't Tag such as {TOKEN:EMAIL} or any other token
                 list($surveyid, $gid, $rest) = explode('X', $condition['cfieldname']);
                 $iRowCount = count(QuestionGroup::model()->findAllByAttributes(array('gid' => $gid)));
                 if (QuestionGroup::model()->hasErrors()) {
//.........这里部分代码省略.........
开发者ID:josetorerobueno,项目名称:test_repo,代码行数:101,代码来源:checkintegrity.php

示例13: array

<?php 
$this->breadcrumbs = array('Miscellaneous Fees Payment' => array('madmin'), 'Manage');
$this->menu = array();
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('student-transaction-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<h1>Select Student</h1>

<!--<p>
You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
</p>-->
<?php 
$dataProvider = $model->search();
$pageSize = Yii::app()->params['pageSize'];
$dataProvider->getPagination()->setPageSize($pageSize);
?>



<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'student-transaction-grid', 'dataProvider' => $dataProvider, 'filter' => $model, 'columns' => array(array('header' => 'SN.', 'class' => 'IndexColumn'), array('name' => 'student_enroll_no', 'value' => '$data->Rel_Stud_Info->student_enroll_no'), array('name' => 'student_first_name', 'value' => '$data->Rel_Stud_Info->student_first_name'), array('name' => 'student_middle_name', 'value' => '$data->Rel_Stud_Info->student_middle_name'), array('name' => 'student_last_name', 'value' => '$data->Rel_Stud_Info->student_last_name'), array('name' => 'student_transaction_branch_id', 'value' => 'Branch::model()->findByPk($data->student_transaction_branch_id)->branch_name', 'filter' => CHtml::listData(Branch::model()->findAll(array('condition' => 'branch_organization_id=' . Yii::app()->user->getState('org_id'))), 'branch_id', 'branch_name')), array('name' => 'student_transaction_quota_id', 'value' => 'Quota::model()->findByPk($data->student_transaction_quota_id)->quota_name', 'filter' => CHtml::listData(Quota::model()->findAll(array('condition' => 'quota_organization_id=' . Yii::app()->user->getState('org_id'))), 'quota_id', 'quota_name')), array('name' => 'student_academic_term_period_tran_id', 'value' => 'AcademicTermPeriod::model()->findByPk($data->student_academic_term_period_tran_id)->academic_term_period', 'filter' => CHtml::listData(AcademicTermPeriod::model()->findAll(array('condition' => 'academic_terms_period_organization_id=' . Yii::app()->user->getState('org_id'))), 'academic_terms_period_id', 'academic_term_period')), array('name' => 'student_academic_term_name_id', 'value' => 'AcademicTerm::model()->findByPk($data->student_academic_term_name_id)->academic_term_name', 'filter' => CHtml::listData(AcademicTerm::model()->findAll(array('condition' => '	academic_term_organization_id=' . Yii::app()->user->getState('org_id'))), 'academic_term_id', 'academic_term_name')), array('class' => 'MyCButtonColumn', 'template' => '{Add Fees}', 'buttons' => array('Add Fees' => array('label' => 'Pay Miscellaneous Fees', 'url' => 'Yii::app()->createUrl("miscellaneousFeesPaymentTransaction/create", array("id"=>$data->student_transaction_id))', 'imageUrl' => Yii::app()->baseUrl . '/images/add.jpeg', 'options' => array('class' => 'fees'))))), 'pager' => array('class' => 'AjaxList', 'maxButtonCount' => $model->count(), 'header' => '')));
开发者ID:sharmarakesh,项目名称:edusec-college-management-system,代码行数:22,代码来源:madmin.php

示例14: array

                <?php 
//echo $form->error($model,'isContact');
?>
                </div>-->

            </div> 
            <?php 
if (Yii::app()->user->checkAccess("showSpecQuota")) {
    ?>
                <div class="row-fluid">
                    <div class="span12">
                        <?php 
    echo $form->labelEx($model, 'QuotaID');
    ?>
                        <?php 
    echo $form->dropDownList($model, 'QuotaID', CHtml::listData(Quota::model()->findAll(), "idQuota", "QuotaName"), array('empty' => "", 'class' => "span12"));
    ?>
                    </div>
                </div>
            <?php 
}
?>


        </div>
        <div class="span6">
            <?php 
if (Yii::app()->user->checkAccess("showBenefits")) {
    ?>
                <div class="row-fluid">
                    <?php 
开发者ID:upmunspel,项目名称:abiturient,代码行数:31,代码来源:_form.php

示例15:

			<?php 
echo Nationality::model()->findByPk($nationid)->nationality_name;
?>
		</div>
	</div>

	<div class="row_t_v">
		<?php 
echo '<lable><b>Quota :</b></lable>';
?>
		<div class="rowm">
			<?php 
$quotaid = StudentTransaction::model()->findByPk($model->student_archive_stud_tran_id)->student_transaction_category_id;
?>
			<?php 
echo Quota::model()->findByPk($quotaid)->quota_name;
?>
		</div>
	</div>
</div>

<div class = "row_all_a">
	<div class="row_t_v">
		<?php 
echo '<lable><b>Religion :</b></lable>';
?>
		<div class="rowm">

	<?php 
//echo ($model->student_transaction_religion_id != null ? $model->Rel_Religion->religion_name : 'NA');
?>
开发者ID:sharmarakesh,项目名称:edusec-college-management-system,代码行数:31,代码来源:view_tab1.php


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