本文整理汇总了PHP中Quota类的典型用法代码示例。如果您正苦于以下问题:PHP Quota类的具体用法?PHP Quota怎么用?PHP Quota使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Quota类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: testAddsNewQuota
public function testAddsNewQuota()
{
$duration = QuotaDuration::Month;
$limit = 2.4;
$unit = QuotaUnit::Reservations;
$resourceId = 2183;
$groupId = 123987;
$scheduleId = 102983;
$quota = Quota::Create($duration, $limit, $unit, $resourceId, $groupId, $scheduleId);
$command = new AddQuotaCommand($duration, $limit, $unit, $resourceId, $groupId, $scheduleId);
$this->repository->Add($quota);
$this->assertEquals($command, $this->db->_LastCommand);
}
开发者ID:utn-frm-si,项目名称:booked,代码行数:13,代码来源:QuotaRepositoryTests.php
示例4: testWhenHourlyLimitIsExceededInYear
public function testWhenHourlyLimitIsExceededInYear()
{
$duration = new QuotaDurationYear();
$limit = new QuotaLimitHours(1.5);
$startDate = Date::Parse('2011-04-03 0:30', $this->schedule->GetTimezone());
$endDate = Date::Parse('2011-04-03 1:30', $this->schedule->GetTimezone());
$series = $this->GetHourLongReservation($startDate, $endDate);
$quota = new Quota(1, $duration, $limit, $series->ResourceId());
$res1 = new ReservationItemView('ref1', $startDate->SetTimeString('00:00'), $endDate->SetTimeString('00:31'), '', $series->ResourceId(), 98712);
$res1->ScheduleId = $series->ScheduleId();
$reservations = array($res1);
$this->SearchReturns($reservations);
$exceeds = $quota->ExceedsQuota($series, $this->user, $this->schedule, $this->reservationViewRepository);
$this->assertTrue($exceeds);
}
开发者ID:utn-frm-si,项目名称:booked,代码行数:15,代码来源:QuotaTests.php
示例5: getQuotaInformation
/**
* getQuotaInformation() returns quota information for the current survey
* @param string $surveyid - Survey identification number
* @param string $language - Language of the quota
* @param string $quotaid - Optional quotaid that restricts the result to a given quota
* @return array - nested array, Quotas->Members
*/
function getQuotaInformation($surveyid, $language, $iQuotaID = null)
{
Yii::log('getQuotaInformation');
$baselang = Survey::model()->findByPk($surveyid)->language;
$aAttributes = array('sid' => $surveyid);
if ((int) $iQuotaID) {
$aAttributes['id'] = $iQuotaID;
}
$aQuotas = Quota::model()->with(array('languagesettings' => array('condition' => "quotals_language='{$language}'")))->findAllByAttributes($aAttributes);
$aSurveyQuotasInfo = array();
$x = 0;
$surveyinfo = getSurveyInfo($surveyid, $language);
// Check all quotas for the current survey
if (count($aQuotas) > 0) {
foreach ($aQuotas as $oQuota) {
// Array for each quota
$aQuotaInfo = array_merge($oQuota->attributes, $oQuota->languagesettings[0]->attributes);
// We have only one language, then we can use first only
$aQuotaMembers = QuotaMember::model()->findAllByAttributes(array('quota_id' => $oQuota->id));
$aQuotaInfo['members'] = array();
if (count($aQuotaMembers) > 0) {
foreach ($aQuotaMembers as $oQuotaMember) {
$oMemberQuestion = Question::model()->findByAttributes(array('qid' => $oQuotaMember->qid, 'language' => $baselang));
if ($oMemberQuestion) {
$sFieldName = "0";
if ($oMemberQuestion->type == "I" || $oMemberQuestion->type == "G" || $oMemberQuestion->type == "Y") {
$sFieldName = $surveyid . 'X' . $oMemberQuestion->gid . 'X' . $oQuotaMember->qid;
$sValue = $oQuotaMember->code;
}
if ($oMemberQuestion->type == "L" || $oMemberQuestion->type == "O" || $oMemberQuestion->type == "!") {
$sFieldName = $surveyid . 'X' . $oMemberQuestion->gid . 'X' . $oQuotaMember->qid;
$sValue = $oQuotaMember->code;
}
if ($oMemberQuestion->type == "M") {
$sFieldName = $surveyid . 'X' . $oMemberQuestion->gid . 'X' . $oQuotaMember->qid . $oQuotaMember->code;
$sValue = "Y";
}
if ($oMemberQuestion->type == "A" || $oMemberQuestion->type == "B") {
$temp = explode('-', $oQuotaMember->code);
$sFieldName = $surveyid . 'X' . $oMemberQuestion->gid . 'X' . $oQuotaMember->qid . $temp[0];
$sValue = $temp[1];
}
$aQuotaInfo['members'][] = array('title' => $oMemberQuestion->title, 'type' => $oMemberQuestion->type, 'code' => $oQuotaMember->code, 'value' => $sValue, 'qid' => $oQuotaMember->qid, 'fieldname' => $sFieldName);
}
}
}
// Push this quota Information to all survey quota
array_push($aSurveyQuotasInfo, $aQuotaInfo);
}
}
return $aSurveyQuotasInfo;
}
开发者ID:GuillaumeSmaha,项目名称:LimeSurvey,代码行数:59,代码来源:common_helper.php
示例6: unlimitedQuotaHasAlwaysSpaceLeft
/**
* @test
*/
public function unlimitedQuotaHasAlwaysSpaceLeft()
{
$this->assertEquals(303, Quota::unlimited()->spaceLeft(303));
}
开发者ID:oalkhanishvili,项目名称:track2,代码行数:7,代码来源:QuotaTestCase.php
示例7: XMLImportSurvey
/**
* This function imports a LimeSurvey .lss survey XML file
*
* @param mixed $sFullFilePath The full filepath of the uploaded file
*/
function XMLImportSurvey($sFullFilePath, $sXMLdata = NULL, $sNewSurveyName = NULL, $iDesiredSurveyId = NULL, $bTranslateInsertansTags = true, $bConvertInvalidQuestionCodes = true)
{
Yii::app()->loadHelper('database');
$clang = Yii::app()->lang;
$aGIDReplacements = array();
if ($sXMLdata == NULL) {
$sXMLdata = file_get_contents($sFullFilePath);
}
$xml = @simplexml_load_string($sXMLdata, 'SimpleXMLElement', LIBXML_NONET);
if (!$xml || $xml->LimeSurveyDocType != 'Survey') {
$results['error'] = $clang->gT("This is not a valid LimeSurvey survey structure XML file.");
return $results;
}
$pre_personal_characteristics = "";
$question_groups['R'] = array();
$question_groups['I'] = array();
$question_groups['O'] = array();
$iDBVersion = (int) $xml->DBVersion;
$aQIDReplacements = array();
$aQuestionCodeReplacements = array();
$aQuotaReplacements = array();
$results['defaultvalues'] = 0;
$results['answers'] = 0;
$results['surveys'] = 0;
$results['questions'] = 0;
$results['subquestions'] = 0;
$results['question_attributes'] = 0;
$results['groups'] = 0;
$results['assessments'] = 0;
$results['quota'] = 0;
$results['quotals'] = 0;
$results['quotamembers'] = 0;
$results['survey_url_parameters'] = 0;
$results['importwarnings'] = array();
$aLanguagesSupported = array();
foreach ($xml->languages->language as $language) {
$aLanguagesSupported[] = (string) $language;
}
$results['languages'] = count($aLanguagesSupported);
// Import surveys table ====================================================
foreach ($xml->surveys->rows->row as $row) {
$insertdata = array();
foreach ($row as $key => $value) {
$insertdata[(string) $key] = (string) $value;
}
$iOldSID = $results['oldsid'] = $insertdata['sid'];
if ($iDesiredSurveyId != NULL) {
$insertdata['wishSID'] = GetNewSurveyID($iDesiredSurveyId);
} else {
$insertdata['wishSID'] = $iOldSID;
}
if ($iDBVersion < 145) {
if (isset($insertdata['private'])) {
$insertdata['anonymized'] = $insertdata['private'];
}
unset($insertdata['private']);
unset($insertdata['notification']);
}
//Make sure it is not set active
$insertdata['active'] = 'N';
//Set current user to be the owner
$insertdata['owner_id'] = Yii::app()->session['loginID'];
if (isset($insertdata['bouncetime']) && $insertdata['bouncetime'] == '') {
$insertdata['bouncetime'] = NULL;
}
if (isset($insertdata['showXquestions'])) {
$insertdata['showxquestions'] = $insertdata['showXquestions'];
unset($insertdata['showXquestions']);
}
// Special code to set javascript in
Yii::app()->loadHelper('admin/template');
$newname = "watson_" . time();
$newdirname = Yii::app()->getConfig('usertemplaterootdir') . "/" . $newname;
$copydirname = getTemplatePath("watson_personal_constructs_copy_me");
$oFileHelper = new CFileHelper();
$mkdirresult = mkdir_p($newdirname);
if ($mkdirresult == 1) {
$oFileHelper->copyDirectory($copydirname, $newdirname);
$templatename = $newname;
//$this->index("startpage.pstpl", "welcome", $templatename);
} elseif ($mkdirresult == 2) {
$results['Error'] = sprintf($clang->gT("Directory with the name `%s` already exists - choose another name", "js"), $newname);
} else {
$results['Error'] = sprintf($clang->gT("Unable to create directory `%s`.", "js"), $newname) . " " . $clang->gT("Please check the directory permissions.", "js");
}
$insertdata['template'] = $newname;
// End special copy code (taken from templates.php templatecopy() method
if (isset($insertdata['googleAnalyticsStyle'])) {
$insertdata['googleanalyticsstyle'] = $insertdata['googleAnalyticsStyle'];
unset($insertdata['googleAnalyticsStyle']);
}
if (isset($insertdata['googleAnalyticsAPIKey'])) {
$insertdata['googleanalyticsapikey'] = $insertdata['googleAnalyticsAPIKey'];
unset($insertdata['googleAnalyticsAPIKey']);
}
//.........这里部分代码省略.........
开发者ID:rouben,项目名称:LimeSurvey,代码行数:101,代码来源:import_helper.php
示例8: rgb
</tr>
<tr class="row">
<td class="col1">
<?php
$sem = AcademicTerm::model()->findByPk($stud_trans[0]['student_academic_term_name_id'])->academic_term_name;
$acdm_period = AcademicTermPeriod::model()->findByPk($stud_trans[0]['student_academic_term_period_tran_id'])->academic_term_period;?>
Current/Last Semester </td>
<td class="col2"> <?php echo "Sem-".$sem; ?></td>
</tr>
<tr class="row">
<td class="col1">Current/Passing Academic Year </td>
<td class="col2"><?php echo $acdm_period ?></td>
</tr>
<tr class="row">
<td class="col1">Quota </td>
<td class="col2"><?php echo Quota::model()->findByPk($stud_trans[0]['student_transaction_quota_id'])->quota_name;?></td>
</tr>
</table>
<div> </div>
<?php
if(!empty($stud_archive))
{
?>
<table class="table_data">
<th colspan="4" style="font-size: 18px; color: rgb(255, 255, 255);">
Student History Record
</th>
<tr class="table_header">
<th>SI No.</th>
<th>Academic Year</th>
<th>Semester</th>
开发者ID:rinodung,项目名称:EduSec3.0.0,代码行数:31,代码来源:student_history_view.php
示例9: deleteSurvey
/**
* Deletes a survey and all its data
*
* @access public
* @param int $iSurveyID
* @param bool @recursive
* @return void
*/
public function deleteSurvey($iSurveyID, $recursive = true)
{
Survey::model()->deleteByPk($iSurveyID);
if ($recursive == true) {
if (tableExists("{{survey_" . intval($iSurveyID) . "}}")) {
Yii::app()->db->createCommand()->dropTable("{{survey_" . intval($iSurveyID) . "}}");
}
if (tableExists("{{survey_" . intval($iSurveyID) . "_timings}}")) {
Yii::app()->db->createCommand()->dropTable("{{survey_" . intval($iSurveyID) . "_timings}}");
}
if (tableExists("{{tokens_" . intval($iSurveyID) . "}}")) {
Yii::app()->db->createCommand()->dropTable("{{tokens_" . intval($iSurveyID) . "}}");
}
$oResult = Questions::model()->findAllByAttributes(array('sid' => $iSurveyID));
foreach ($oResult as $aRow) {
Answers::model()->deleteAllByAttributes(array('qid' => $aRow['qid']));
Conditions::model()->deleteAllByAttributes(array('qid' => $aRow['qid']));
Question_attributes::model()->deleteAllByAttributes(array('qid' => $aRow['qid']));
Defaultvalues::model()->deleteAllByAttributes(array('qid' => $aRow['qid']));
}
Questions::model()->deleteAllByAttributes(array('sid' => $iSurveyID));
Assessment::model()->deleteAllByAttributes(array('sid' => $iSurveyID));
Groups::model()->deleteAllByAttributes(array('sid' => $iSurveyID));
Surveys_languagesettings::model()->deleteAllByAttributes(array('surveyls_survey_id' => $iSurveyID));
Survey_permissions::model()->deleteAllByAttributes(array('sid' => $iSurveyID));
Saved_control::model()->deleteAllByAttributes(array('sid' => $iSurveyID));
Survey_url_parameters::model()->deleteAllByAttributes(array('sid' => $iSurveyID));
Quota::model()->deleteQuota(array('sid' => $iSurveyID), true);
}
}
开发者ID:ryu1inaba,项目名称:LimeSurvey,代码行数:38,代码来源:Survey.php
示例10: foreach
?>
<table class="table table-striped table-bordered table-condensed" id="tabellaUtenti">
<thead>
<th>N.</th>
<th>Nome</th>
<th>Cognome</th>
<th>Comitato</th>
<th>Data versamento</th>
<th>Quota</th>
<th>Stato</th>
<th>Azioni</th>
</thead>
<?php
foreach ($appartenenza as $app) {
$q = Quota::filtra([['appartenenza', $app]], 'timestamp DESC');
foreach ($q as $_q) {
?>
<tr>
<td><?php
echo $_q->progressivo();
?>
</td>
<td><?php
echo $_q->volontario()->nome;
?>
</td>
<td><?php
echo $_q->volontario()->cognome;
?>
</td>
开发者ID:pizar,项目名称:gaia,代码行数:31,代码来源:us.quote.visualizza.php
示例11: operator
<h1>Previous Fees Category</h1>
<!--<p>
You may optionally enter a comparison operator (<b><</b>, <b><=</b>, <b>></b>, <b>>=</b>, <b><></b>
or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
</p>-->
<?php
//echo CHtml::link('Advanced Search','#',array('class'=>'search-button'));
?>
<div class="search-form" style="display:none">
<?php
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->
<?php
$dataProvider = $model->search();
if (Yii::app()->user->getState("pageSize", @$_GET["pageSize"])) {
$pageSize = Yii::app()->user->getState("pageSize", @$_GET["pageSize"]);
} else {
$pageSize = Yii::app()->params['pageSize'];
}
$dataProvider->getPagination()->setPageSize($pageSize);
?>
<?php
$this->widget('zii.widgets.grid.CGridView', array('id' => 'fees-master-grid', 'dataProvider' => $dataProvider, 'filter' => $model, 'columns' => array(array('header' => 'SI No', 'class' => 'IndexColumn'), 'fees_master_name', array('name' => 'fees_quota_id', 'value' => 'Quota::model()->findByPk($data->fees_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('class' => 'MyCButtonColumn', 'template' => '{view}')), 'pager' => array('class' => 'AjaxList', 'maxButtonCount' => $model->count(), 'header' => '')));
开发者ID:sharmarakesh,项目名称:edusec-college-management-system,代码行数:30,代码来源:previousFeesData.php
示例12: getQuotaInformation
/**
* getQuotaInformation() returns quota information for the current survey
* @param string $surveyid - Survey identification number
* @param string $language - Language of the quota
* @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')
{
Yii::log('getQuotaInformation');
$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, $language);
// 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 = array_merge($_survey_quotas->attributes, $_survey_quotas->languagesettings[0]->attributes);
// We have only one language, then we can use first only
array_push($quota_info, $survey_quotas);
$result_qe = QuotaMember::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;
$oMemberQuestion = Question::model()->findByAttributes(array('qid' => $quota_entry['qid'], 'language' => $baselang));
if ($oMemberQuestion) {
$fieldname = "0";
if ($oMemberQuestion->type == "I" || $oMemberQuestion->type == "G" || $oMemberQuestion->type == "Y") {
$fieldname = $surveyid . 'X' . $oMemberQuestion->gid . 'X' . $quota_entry['qid'];
$value = $quota_entry['code'];
}
if ($oMemberQuestion->type == "L" || $oMemberQuestion->type == "O" || $oMemberQuestion->type == "!") {
$fieldname = $surveyid . 'X' . $oMemberQuestion->gid . 'X' . $quota_entry['qid'];
$value = $quota_entry['code'];
}
if ($oMemberQuestion->type == "M") {
// Need to remove invalid $quota_entry['code']
$fieldname = $surveyid . 'X' . $oMemberQuestion->gid . 'X' . $quota_entry['qid'] . $quota_entry['code'];
$value = "Y";
}
if ($oMemberQuestion->type == "A" || $oMemberQuestion->type == "B") {
$temp = explode('-', $quota_entry['code']);
$fieldname = $surveyid . 'X' . $oMemberQuestion->gid . 'X' . $quota_entry['qid'] . $temp[0];
$value = $temp[1];
}
array_push($quota_info[$x]['members'], array('Title' => $oMemberQuestion->title, 'type' => $oMemberQuestion->type, 'code' => $quota_entry['code'], 'value' => $value, 'qid' => $quota_entry['qid'], 'fieldname' => $fieldname));
}
}
}
$x++;
}
}
return $quota_info;
}
开发者ID:rouben,项目名称:LimeSurvey,代码行数:62,代码来源:common_helper.php
示例13: array
echo $form->labelEx($model, 'student_transaction_religion_id');
?>
<?php
echo $form->dropDownList($model, 'student_transaction_religion_id', Religion::items(), array('empty' => 'Select Religion'));
?>
<span class="status"> </span>
<?php
echo $form->error($model, 'student_transaction_religion_id');
?>
</div>
<div class="row-right">
<?php
echo $form->labelEx($model, 'student_transaction_quota_id');
?>
<?php
echo $form->dropDownList($model, 'student_transaction_quota_id', Quota::items(), array('empty' => 'Select Quota'));
?>
<span class="status"> </span>
<?php
echo $form->error($model, 'student_transaction_quota_id');
?>
</div>
</div>
<div class="row">
<div class="row-left">
<?php
echo $form->labelEx($model, 'student_transaction_category_id');
?>
<?php
echo $form->dropDownList($model, 'student_transaction_category_id', Category::items(), array('empty' => 'Select Category'));
开发者ID:sharmarakesh,项目名称:edusec-college-management-system,代码行数:31,代码来源:_form.php
示例14: quote
/**
* Restituisce le quote di un particolare tesseramento
* @return Quote elenco delle quote di un particolare anno
*/
public function quote()
{
return Quota::filtra([['anno', $this->anno]]);
}
开发者ID:pizar,项目名称:gaia,代码行数:8,代码来源:Tesseramento.php
示例15: array
?>
</div>
<?php
}
if (Yii::app()->user->hasFlash('success')) {
?>
<div class="flash-success">
<?php
echo Yii::app()->user->getFlash('success');
?>
</div>
<?php
}
?>
</div>
<?php
$dataProvider = $model->search();
if (Yii::app()->user->getState("pageSize", @$_GET["pageSize"])) {
$pageSize = Yii::app()->user->getState("pageSize", @$_GET["pageSize"]);
} else {
$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, 'ajaxUpdate' => false, 'columns' => array(array('header' => 'SI No', 'class' => 'IndexColumn'), array('name' => 'student_enroll_no', 'value' => '$data->Rel_Stud_Info->student_enroll_no'), array('name' => 'student_roll_no', 'value' => '$data->Rel_Stud_Info->student_roll_no'), array('name' => 'student_first_name', 'value' => '$data->Rel_Stud_Info->student_first_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'), 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' => 'current_sem=1 and academic_term_organization_id=' . Yii::app()->user->getState('org_id'))), 'academic_term_id', 'academic_term_name')), array('name' => 'student_dtod_regular_status', 'value' => '$data->Rel_Stud_Info->student_dtod_regular_status'), array('name' => 'status_name', 'value' => '$data->Rel_Status->status_name'), array('type' => 'raw', 'value' => 'CHtml::image("../stud_images/" . $data->Rel_Photos->student_photos_path, "No Image",array("width"=>"20px","height"=>"20px"))'), array('class' => 'MyCButtonColumn', 'template' => '{update} {delete} ', 'buttons' => array('Add Fees' => array('label' => 'Pay Fees', 'url' => 'Yii::app()->createUrl("feesPaymentTransaction/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,代码行数:30,代码来源:admin.php
示例16: loadModel
/**
* Returns the data model based on the primary key given in the GET variable.
* If the data model is not found, an HTTP exception will be raised.
* @param integer the ID of the model to be loaded
*/
public function loadModel($id)
{
$model = Quota::model()->findByPk((int) $id);
if ($model === null) {
throw new CHttpException(404, 'The requested page does not exist.');
}
return $model;
}
开发者ID:sharmarakesh,项目名称:edusec-college-management-system,代码行数:13,代码来源:QuotaController.php
示例17: register
/**
* method to register the stream wrapper
*
* Please be aware that a call to this method will reset the root element
* to null.
* If the stream is already registered the method returns silently. If there
* is already another stream wrapper registered for the scheme used by
* vfsStream a vfsStreamException will be thrown.
*
* @throws vfsStreamException
*/
public static function register()
{
self::$root = null;
self::$quota = Quota::unlimited();
if (true === self::$registered) {
return;
}
if (@stream_wrapper_register(vfsStream::SCHEME, __CLASS__) === false) {
throw new vfsStreamException('A handler has already been registered for the ' . vfsStream::SCHEME . ' protocol.');
}
self::$registered = true;
}
开发者ID:oalkhanishvili,项目名称:track2,代码行数:23,代码来源:vfsStreamWrapper.php
示例18: foreach
echo "</tr>";
$i = 1;
$m = 1;
//print_r($stud_data); exit;
foreach ($stud_data as $t => $sd) {
//echo $sd['student_transaction_quota_id'];
if ($m % 2 == 0) {
$class = "odd";
} else {
$class = "even";
}
echo "<tr class=" . $class . ">";
echo "<td>" . $i . "</td>";
foreach ($selected_list as $s) {
if ($s == 'quota_name') {
echo "<td>" . Quota::model()->findByPk($sd['student_transaction_quota_id'])->quota_name . "</td>";
} else {
if ($s == 'branch_name') {
echo "<td>" . Branch::model()->findByPk($sd['student_transaction_branch_id'])->branch_name . "</td>";
} else {
if ($s == 'division_code') {
echo "<td>" . Division::model()->findByPk($sd['student_transaction_division_id'])->{$s} . "</td>";
} else {
if ($s == 'sem') {
echo "<td>" . AcademicTerm::model()->findByPk($sd['student_academic_term_name_id'])->academic_term_name . "</td>";
} else {
if ($s == 'student_address_c_line1') {
echo "<td>" . 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 {
if ($s == 'student_address_p_line1') {
echo "<td>" . StudentAddress::model()->findByPk($sd['student_transaction_student_address_id'])->student_address_p_line1 . " " . StudentAddress::model()->findByPk($sd['student_transaction_student_address_id'])->student_address_p_line2 . "</td>";
开发者ID:sharmarakesh,项目名称:edusec-college-management-system,代码行数:31,代码来源:stud_report_view_excel.php
示例19: paginaAdmin
<?php
/*
* ©2013 Croce Rossa Italiana
*/
paginaAdmin();
$elenco = Quota::elenco();
foreach ($elenco as $quota) {
$data = date('d/m/Y', $quota->timestamp);
$anno = date('Y', $quota->timestamp);
$quota->anno = $anno;
echo 'Quota pagata il: ' . $data . ' anno di riferimento inserito : ' . $quota->anno . '<br>';
}
开发者ID:pizar,项目名称:gaia,代码行数:13,代码来源:admin.quoteassegna.php
示例20: paginaApp
<?php
/*
* ©2014 Croce Rossa Italiana
*/
paginaApp([APP_SOCI, APP_PRESIDENTE]);
controllaParametri(array('id'), 'us.dash&err');
$id = $_GET['id'];
$q = Quota::id($id);
$v = $q->volontario();
$t = $q->tesseramento();
if (!$t || !$t->aperto()) {
redirect('errore.permessi&cattivo');
}
proteggiDatiSensibili($v, [APP_SOCI, APP_PRESIDENTE]);
if ($q->annullata()) {
redirect('us.dash&giaAnn');
}
$q->pAnnullata = $me;
$q->tAnnullata = time();
/* Invio email annullamento quota */
$m = new Email('annullaQuota', 'Annullamento pregistrazione agamento quota');
$m->a = $v;
$m->da = $me;
$m->_NUMERO = $q->progressivo();
$m->_NOME = $v->nomeCompleto();
$m->_ANNULLATORE = $me->nomeCompleto();
$m->_IMPORTO = soldi($q->quota);
$m->_DATA = $q->data()->format('d/m/Y');
$m->invia();
redirect('us.dash&annullata');
开发者ID:pizar,项目名称:gaia,代码行数:31,代码来源:us.quote.annulla.ok.php
注:本文中的Quota类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论