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


PHP checkArray函数代码示例

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


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

示例1: getCurrentSemester

 public function getCurrentSemester()
 {
     $this->db->select('semester.*');
     $this->db->from('semester');
     $this->db->join('current_semester', 'current_semester.id_semester = semester.id_semester');
     $currentSemester = $this->db->get()->row_array();
     $currentSemester = checkArray($currentSemester);
     return $currentSemester;
 }
开发者ID:kailIII,项目名称:SiGA,代码行数:9,代码来源:semester_model.php

示例2: getGroupPermissions

 /**
  * Search on database for the permissions of a group
  * @param $groupId - The group id to get the permissions
  * @return an array with the permissions of the given group
  */
 public function getGroupPermissions($groupId)
 {
     $this->db->select('permission.permission_name, permission.route');
     $this->db->from("permission");
     $this->db->join("group_permission", "permission.id_permission = group_permission.id_permission");
     $this->db->where("group_permission.id_group", $groupId);
     $groupPermissions = $this->db->get()->result_array();
     $groupPermissions = checkArray($groupPermissions);
     return $groupPermissions;
 }
开发者ID:kailIII,项目名称:SiGA,代码行数:15,代码来源:permission_model.php

示例3: checkArray

function checkArray($val, $arr)
{
    if (in_array($val, $arr)) {
        return true;
    }
    foreach ($arr as $k) {
        if (is_array($k) && checkArray($val, $k)) {
            return true;
        }
    }
    return false;
}
开发者ID:hevelmo,项目名称:themes,代码行数:12,代码来源:functions.php

示例4: getCurrentYear

function getCurrentYear()
{
    $ci = get_instance();
    $getYearSql = "SELECT YEAR(CURDATE())";
    $currentYear = $ci->db->query($getYearSql)->row_array();
    $currentYear = checkArray($currentYear);
    if ($currentYear !== FALSE) {
        $currentYear = $currentYear['YEAR(CURDATE())'];
    } else {
        $currentYear = FALSE;
    }
    return $currentYear;
}
开发者ID:kailIII,项目名称:SiGA,代码行数:13,代码来源:time_helper.php

示例5: sendData

 public function sendData($package_data)
 {
     $output = array();
     foreach ($package_data as $package) {
         $user = checkArray($package, 'user') ? $package['user'] : false;
         $repo = checkArray($package, 'repo') ? $package['repo'] : false;
         $description = checkArray($package, 'description') ? $package['description'] : false;
         if ($user && $repo && $description) {
             $output[$user . ':' . $repo] = array('user' => $user, 'repo' => $repo, 'description' => $description);
         }
     }
     return json_encode($output);
 }
开发者ID:sudhanshuraheja,项目名称:Generatrix-Packages,代码行数:13,代码来源:packagesController.php

示例6: checkArray

function checkArray($array)
{
    foreach ($array as $value) {
        if (is_array($value)) {
            if (count($value)) {
                if (!checkArray($value)) {
                    return false;
                }
            }
        } else {
            $value = trim($value);
            if (!empty($value)) {
                return false;
            }
        }
        $i++;
    }
    return true;
}
开发者ID:AranKyun,项目名称:SKLSE-website,代码行数:19,代码来源:helpers.php

示例7: getExpenseType

 public function getExpenseType($value)
 {
     $objectToReturn = $this->db->get_where("expense_type", array('id' => $value))->row_array();
     $objectToReturn = checkArray($objectToReturn);
     return $objectToReturn;
 }
开发者ID:kailIII,项目名称:SiGA,代码行数:6,代码来源:expense_model.php

示例8: row

 private function row($type, $param_name = '', $param_value = '', $param_type = '')
 {
     $text = $type == 'text' ? true : false;
     $textarea = $type == 'textarea' ? true : false;
     $checkbox = $type == 'checkbox' ? true : false;
     $file = $type == 'file' ? true : false;
     $submit = $type == 'submit' ? true : false;
     $hidden = $type == 'hidden' ? true : false;
     $select = $type == 'select' ? true : false;
     $datepicker = $type == 'datepicker' ? true : false;
     if (!$hidden) {
         $this->values_count++;
     }
     if ($file) {
         $this->upload_count++;
     }
     $html = "";
     if ($text || $textarea || $checkbox || $file || $submit || $select || $datepicker) {
         if ($param_name == 'state') {
             $html .= "<div class='" . $this->form_label_class . "' id='store_state_name'>";
         } elseif ($param_name == 'fun_category_id') {
             $html .= "<div class='" . $this->form_label_class . "' id='fun_admin' style='display:none'>";
         } elseif ($param_name == 'city') {
             $html .= "<div class='" . $this->form_label_class . "' id='store_city_name'>";
         } elseif ($param_name == 'categoryid' && $param_value == '') {
             $html .= "<div class='" . $this->form_label_class . "' id='categoryid' style='display: none'>";
             //} elseif($param_name == 'latitude' || $param_name == 'longitude') {
             //		$html .= "<div class='" . $this->form_label_class . " store_latlng'  style='display: none'>";
         } else {
             $html .= "<div class='" . $this->form_label_class . "'>";
         }
     }
     if ($text || $textarea || $checkbox || $file || $submit || $select || $datepicker) {
         $html .= "<div class='generatrix-control-form-label-internal'>";
     }
     if ($text || $textarea || $checkbox || $file || $select || $datepicker) {
         $html .= $this->processName($param_name);
     }
     if ($submit) {
         $html .= "&nbsp;";
     }
     if ($text || $textarea || $checkbox || $file || $submit || $select || $datepicker) {
         $html .= "</div>";
     }
     if ($text || $textarea || $checkbox || $file || $submit || $select || $datepicker) {
         $html .= "</div>";
     }
     if ($text || $textarea || $checkbox || $file || $submit || $select || $datepicker) {
         $html .= "<div class='" . $this->form_value_class . "'>";
     }
     $textarea_size = '50px';
     if ($textarea) {
         if ($param_type != '') {
             $size = str_replace('varchar_', '', $param_type);
             if ($size > 256 && $size < 512) {
                 $textarea_size = '80px';
             } else {
                 if ($size > 512) {
                     $textarea_size = '200px';
                 }
             }
         }
     }
     if ($text) {
         if (!$param_value && ($param_name == 'categorytype' || $param_name == 'categoryname' || $param_name == 'fun_category_id')) {
             $selected = isset($_POST['selectcat']) ? $_POST['selectcat'] : '';
             $split = explode('$##$', $selected);
             $category_type = checkArray($split, 0) ? $split[0] : '';
             $category_name = checkArray($split, 1) ? $split[1] : '';
             $category_id = checkArray($split, 2) ? $split[2] : '';
             if ($param_name == 'categorytype') {
                 $html .= "<input type='text' class='generatrix-control-form-element-text'  name='" . $param_name . "' value='" . $category_type . "' readonly />";
             }
             if ($param_name == 'categoryname') {
                 $html .= "<input type='text' class='generatrix-control-form-element-text'  name='" . $param_name . "' value='" . $category_name . "' readonly />";
             }
             if ($param_name == 'fun_category_id') {
                 $html .= "<input type='hidden' class='generatrix-control-form-element-text'  name='" . $param_name . "' value='" . $category_id . "' />";
             }
         } elseif ($param_value && ($param_name == 'categorytype' || $param_name == 'categoryname' || $param_name == 'fun_category_id')) {
             if ($param_name == 'categorytype') {
                 $html .= "<input type='text' class='generatrix-control-form-element-text'  name='" . $param_name . "' value='" . $param_value . "' readonly />";
             }
             if ($param_name == 'categoryname') {
                 $html .= "<input type='text' class='generatrix-control-form-element-text'  name='" . $param_name . "' value='" . $param_value . "' readonly />";
             }
         } elseif ($param_name == 'width' || $param_name == 'height') {
             $html .= "<input type='text' maxlength='3' size='3' style='width: auto;' class='generatrix-control-form-element-text' name='" . $param_name . "' value='" . $param_value . "' />";
         } elseif ($param_name == 'country') {
             $html .= "<input type='text' class='generatrix-control-form-element-text' id='store_country'  name='" . $param_name . "' value='" . $param_value . "' />";
         } elseif ($param_name == 'state') {
             $html .= "<input type='text' class='generatrix-control-form-element-text' id='store_state'  name='" . $param_name . "' value='" . $param_value . "' />";
         } elseif ($param_name == 'city') {
             $html .= "<input type='text' class='generatrix-control-form-element-text' id='store_city'  name='" . $param_name . "' value='" . $param_value . "' />";
         } elseif ($param_name == 'categoryid' && $param_value == '') {
             $category_id = isset($_POST['selectcat']) ? $_POST['selectcat'] : '';
             $html .= "<input type='hidden' class='generatrix-control-form-element-text' name='" . $param_name . "' value='" . $category_id . "' />";
             //} elseif($param_name == 'latitude' || $param_name == 'longitude') {
             //		$html .= "<input type='hidden' class='generatrix-control-form-element-text' name='" . $param_name . "' value='" . $param_value . "' />";
         } elseif ($param_name == 'fun_category_id') {
//.........这里部分代码省略.........
开发者ID:sribanta,项目名称:Generatrix,代码行数:101,代码来源:form_html.php

示例9: rowFile

 private function rowFile($label, $value, $subtext, $required)
 {
     $html = '';
     $html .= '<div class="row">';
     $html .= '	<div class="label-' . $this->size . '" ' . $this->noFloat() . '>';
     $html .= '		' . $label;
     if ($required) {
         $html .= ' *';
     }
     $html .= '	</div>';
     $html .= '	<div class="element-' . $this->size . '" ' . $this->noFloat() . '>';
     $html .= '		<div>';
     $html .= '			<input type="file" id="' . sanitize($label) . '" name="' . sanitize($label) . '" value="" class="form-input-text input-' . $this->size . '" />';
     if ($value != '') {
         $actual_value = checkArray($this->terms, $value) ? $this->terms[$value] : $value;
         $html .= '		<br />' . urldecode($actual_value);
     }
     $html .= '		</div>';
     $html .= '		<div class="form-input-subtext">';
     $html .= '			' . $subtext;
     $html .= '		</div>';
     $html .= '	</div>';
     if ($this->float != 'none') {
         $html .= '	<br clear="all" />';
     }
     $html .= '</div>';
     echo $html;
 }
开发者ID:nikhildixit,项目名称:Generatrix,代码行数:28,代码来源:form.php

示例10: get

 public function get($attr, $value)
 {
     $object = $this->db->get_where("budgetplan", array($attr => $value))->row_array();
     $object = checkArray($object);
     return $object;
 }
开发者ID:kailIII,项目名称:SiGA,代码行数:6,代码来源:budgetplan_model.php

示例11: getGetValue

 public function getGetValue($tag_name)
 {
     return checkArray($_GET, $tag_name) ? mysql_real_escape_string($_GET[$tag_name], $this->getDb()->getConnection()) : false;
 }
开发者ID:nikhildixit,项目名称:Generatrix,代码行数:4,代码来源:controller.php

示例12: foreach

            <?php 
$i = 0;
foreach ($menuname_arr as $valmenu) {
    ?>
            	<div style="padding-top:5px; margin-bottom:10px;"> 
            	<h5 class="heading" style="margin-bottom:5px; color:#06C;"><?php 
    echo $lang_menu[$valmenu];
    ?>
</h5>  
				<div class="columns">    				
					<?php 
    $sql_thismenu = "SELECT * FROM menulist WHERE SUBSTR(menuName,1, INSTR(menuName,'.')-1) = '" . $valmenu . "'";
    $rs_thismenu = mysql_query($sql_thismenu);
    while ($data_thismenu = @mysql_fetch_object($rs_thismenu)) {
        //echo $data_thismenu->menuName;
        if (checkArray($data_thismenu->menuName, $menuname_subarr)) {
            $data_menuid = select_db('menulist', 'where menuName = "' . $data_thismenu->menuName . '"');
            #echo $data_menuid[0]['menuId'];
            $i++;
            ?>
    
							<div>  	
							<label class="uni-checkbox">
								<input type="checkbox" id="check_edit<?php 
            echo $i;
            ?>
" name="check_edit<?php 
            echo $i;
            ?>
" value="<?php 
            echo $data_menuid[0]['menuId'];
开发者ID:poliko6,项目名称:imatt-taxi,代码行数:31,代码来源:type.1.show.php

示例13: checkExistingMessage

 private function checkExistingMessage($mastermindId, $requestId)
 {
     $messageData = array('id_mastermind' => $mastermindId, 'id_request' => $requestId);
     $existingMessage = $this->db->get_where('mastermind_message', $messageData)->row_array();
     $existingMessage = checkArray($existingMessage);
     if ($existingMessage !== FALSE) {
         if ($existingMessage['message'] !== NULL) {
             $thereIsMessage = TRUE;
         } else {
             $thereIsMessage = FALSE;
         }
     } else {
         $thereIsMessage = FALSE;
     }
     return $thereIsMessage;
 }
开发者ID:kailIII,项目名称:SiGA,代码行数:16,代码来源:request_model.php

示例14: getOfferSemester

 public function getOfferSemester($offerId)
 {
     $offerExists = $this->checkIfOfferExists($offerId);
     if ($offerExists) {
         $searchResult = $this->db->get_where('semester', array('offer' => $offerId));
         $foundOfferSemester = $searchResult->row_array();
         $foundOfferSemester = checkArray($foundOfferSemester);
     } else {
         $foundOfferSemester = FALSE;
     }
     return $foundOfferSemester;
 }
开发者ID:kailIII,项目名称:SiGA,代码行数:12,代码来源:offer_model.php

示例15: getProgramEvaluation

 private function getProgramEvaluation($evaluationData)
 {
     $foundEvaluation = $this->db->get_where('program_evaluation', $evaluationData)->row_array();
     $foundEvaluation = checkArray($foundEvaluation);
     return $foundEvaluation;
 }
开发者ID:kailIII,项目名称:SiGA,代码行数:6,代码来源:program_evaluation_model.php


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