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


PHP get_values函数代码示例

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


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

示例1: render_symptom

function render_symptom($dbc, $db_name, $id)
{
    echo '<p>症状:</p>';
    $diseases = array();
    $values = array_merge(get_values($dbc, PREFIX . $id, "症状加(调整)"), get_values($dbc, PREFIX . $id, "症状减(调整)"));
    foreach ($values as $value) {
        if (array_key_exists($value, $diseases)) {
            $diseases[$value] = $diseases[$value] + 1;
        } else {
            $diseases[$value] = 1;
        }
    }
    arsort($diseases);
    //$diseases = array_slice(array_keys($diseases), 0, 5);
    $diseases = array_keys($diseases);
    echo '<ul>';
    foreach ($diseases as $value) {
        //echo '<li class="list-group-item">';
        echo '<li>';
        echo render_value($dbc, $db_name, $value, true);
        echo '&nbsp;<a class="btn btn-xs btn-primary" href="qa.php?db_name=' . $db_name . '&keywords=' . get_entity_name($dbc, $value) . '&question_type=症状" ><span class="glyphicon glyphicon-search"></span></a>';
        echo '<p/></li>';
    }
    echo '</ul>';
}
开发者ID:sdgdsffdsfff,项目名称:LOD,代码行数:25,代码来源:qa_syndrome_plus.php

示例2: export_values

/**
 * Exporting values as a string
 * @package Skip\Forms
 * @since 1.0
 * @ignore
 */
function export_values($option_groups)
{
    foreach ($option_groups as $option_group) {
        $values = serialize((array) get_values($option_group));
        $serialized_val .= $values;
    }
    return $serialized_val;
}
开发者ID:antoniorequenalorente,项目名称:Fanpage-import,代码行数:14,代码来源:export.php

示例3: get_herb_plus

function get_herb_plus($dbc, $db_name, $value)
{
    $herb_links = array();
    $herbs = array_merge(get_values($dbc, $value, '中药加(调整)'));
    foreach ($herbs as $herb) {
        $herb_links[] = render_value($dbc, $db_name, $herb, false);
    }
    $herb_title = '';
    if (count($herb_links) != 0) {
        $herb_title = '加' . implode(',&nbsp;', $herb_links);
    }
    return $herb_title;
}
开发者ID:sdgdsffdsfff,项目名称:LOD,代码行数:13,代码来源:qa_helper.php

示例4: render_treatment

function render_treatment($dbc, $db_name, $id)
{
    echo '<p>系统为您推荐如下的方剂:</p>';
    $formulas = array();
    $values = array_merge(get_subjects($dbc, PREFIX . $id, "治疗"), get_values($dbc, PREFIX . $id, "被...治疗"));
    foreach ($values as $value) {
        if (array_key_exists($value, $formulas)) {
            $formulas[$value] = $formulas[$value] + 1;
        } else {
            $formulas[$value] = 1;
        }
    }
    arsort($formulas);
    //$formulas = array_slice(array_keys($formulas), 0, 5);
    $formulas = array_keys($formulas);
    echo '<ol>';
    foreach ($formulas as $value) {
        //echo '<li class="list-group-item">';
        echo '<li>';
        echo render_value($dbc, $db_name, $value, true);
        echo '<p/></li>';
    }
    echo '</ol>';
}
开发者ID:sdgdsffdsfff,项目名称:LOD,代码行数:24,代码来源:qa_disease.php

示例5: get_entity_of_type

    $id = get_entity_of_type($dbc, $name, $question_type);
    if ($id != '') {
        array_push($ids, $id);
    }
}
if (!empty($ids)) {
    echo '<p>您输入的症状集合为:';
    foreach ($ids as $id) {
        echo '&nbsp;' . render_value($dbc, $db_name, PREFIX . $id, false);
    }
    echo '</p>';
    echo '<hr>';
    echo '<p>&nbsp;系统为您推荐如下的证候:</p>';
    $formulas = array();
    foreach ($ids as $id) {
        $values = array_merge(get_subjects($dbc, PREFIX . $id, "由...组成"), get_values($dbc, PREFIX . $id, "组成"));
        foreach ($values as $value) {
            if (array_key_exists($value, $formulas)) {
                $formulas[$value] = $formulas[$value] + 1;
            } else {
                $formulas[$value] = 1;
            }
        }
    }
    arsort($formulas);
    //print_r($syndromes);
    $formulas = array_slice(array_keys($formulas), 0, 5);
    //echo '<ul class="list-group">';
    echo '<ol >';
    foreach ($formulas as $value) {
        //echo '<li class="list-group-item">';
开发者ID:sdgdsffdsfff,项目名称:LOD,代码行数:31,代码来源:qa_symptom.php

示例6: get_map_values

function get_map_values($conn, $map, $name, $type, $host_types)
{
    $r_value_max = -1;
    $v_value_max = -1;
    $a_value_max = -1;
    $r_value_aux = -1;
    $v_value_aux = -1;
    $a_value_aux = -1;
    $sensor = '';
    $ips = $name;
    $in_assets = 0;
    list($map_array, $obj_map) = get_map_objects($conn, $map);
    foreach ($obj_map as $object) {
        list($name, $sensor, $type, $ips, $in_assets) = get_assets($conn, $object['type_name'], $object['type'], $host_types);
        list($r_value_aux, $v_value_aux, $a_value_aux) = get_values($conn, $host_types, $object['type'], $name, TRUE);
        if ($r_value_aux > $r_value_max) {
            $r_value_max = $r_value_aux;
        }
        if ($v_value_aux > $v_value_max) {
            $v_value_max = $v_value_aux;
        }
        if ($a_value_aux > $a_value_max) {
            $a_value_max = $a_value_aux;
        }
    }
    $r_value = get_value_by_digit($r_value_max);
    $v_value = get_value_by_digit($v_value_max);
    $a_value = get_value_by_digit($a_value_max);
    return array($r_value, $v_value, $a_value, $name, $sensor, $type, $ips, $in_assets);
}
开发者ID:jackpf,项目名称:ossim-arc,代码行数:30,代码来源:riskmaps_functions.php

示例7: get_values

<?php

$poll_values = get_values($current_poll);
$category = ucwords(str_replace("_", " ", $current_poll));
$column_names = get_column_names($current_poll);
echo "<h2 class=\"center top-spacer_20\">" . format_poll_header($current_poll, $category) . "</h2>\n\n    <form action=\"yearendpoll.php\" method=\"post\" name=\"year_end_" . $current_poll . "\" class=\"form-default\">\n    <fieldset>\n<div class=\"control-group\">\n<div class=\"controls\">\n";
for ($i = 1; $i <= mysql_num_rows($poll_values); $i++) {
    $info = mysql_fetch_assoc($poll_values);
    echo "<label for=\"" . $info['id'] . "\" class=\"half\"><input type=\"checkbox\" name=\"year_end_votes[]\" id=\"" . $info['id'] . "\" value=\"" . $info['id'] . "\">";
    for ($c = 1; $c <= count($column_names) - 2; $c++) {
        echo "<span>" . $info[$column_names[$c]];
        if ($column_names[$c + 1] != 'votes') {
            echo " - ";
        }
    }
    echo "\n</span>\n</label>\n";
}
echo "</div>\n<div class=\"control-group top-spacer_20\">\n\n    <div class=\"controls\">\n\n    <input type=\"checkbox\" id=\"song_write_in\"> <input type=\"text\" disabled=\"disabled\" class=\"input-xl\" id=\"write_in_value\" name=\"write_in_value\">\n\n    <div class=\"form-other\">Other (please specify)</div>\n</div>\n</div>\n\n    </div>\n<div class=\"form-actions\">\n<button class=\"btn-info disabled\" type=\"submit\" disabled=\"disabled\" id=\"vote\">Pick " . max_picks_for($current_poll) . " more!</button>\n\n    <input type=\"hidden\" name=\"poll\" value=" . $current_poll . ">\n</div>\n\n    </form>\n</div>\n</fieldset>";
开发者ID:ynotradio,项目名称:site,代码行数:18,代码来源:_year_end_poll_vote.php

示例8: session_start

<?php

session_start();
// Initialize Session data
ob_start();
// Turn on output buffering
include_once "ewcfg8.php";
include_once "ewmysql8.php";
include_once "phpfn8.php";
include_once "userfn8.php";
if ($_POST['a_addopt']) {
    $fields = get_fields();
    $values = get_values();
    insert_data($fields, $values);
}
function get_fields()
{
    $fields = array();
    foreach ($_POST as $field => $value) {
        $field = str_replace("x_", "", $field);
        array_push($fields, $field);
    }
    return $fields;
}
function get_values()
{
    $values = array();
    foreach ($_POST as $field => $value) {
        array_push($values, $value);
    }
    return $values;
开发者ID:Razinsky,项目名称:echaude-com,代码行数:31,代码来源:dialogFunctions.php

示例9: overall_header

    overall_header($lang['int_integration'], $lang['int_integration'], 'main');
    $admin_tmpl['integration'] = true;
} elseif (isset($_GET['action']) && $_GET['action'] == 'wizard') {
    $auth = user_auth('12');
    overall_header($lang['wiz_wizard'], $lang['wiz_wizard'], 'main');
    $admin_tmpl['wizard'] = true;
    $mn_users = load_basic_data('users');
    $mn_categories = load_basic_data('categories');
    $t_groups = array();
    $t_groups = load_basic_data('templates_groups');
    if (file_exists(MN_ROOT . $file['posts'])) {
        $p_file = file(MN_ROOT . $file['posts']);
        array_shift($p_file);
        $authors = array();
        foreach ($p_file as $p_line) {
            $post = get_values('posts', $p_line, false);
            $authors[] = $post['author'];
        }
        $authors = array_unique($authors);
    } else {
        $authors = array();
    }
} elseif (isset($_POST['action']) && $_POST['action'] == 'wizard') {
    $auth = user_auth('12');
    $wizard_code = '';
    if (!empty($_POST['count']) && is_numeric($_POST['count'])) {
        $wizard_code .= '$mn_count = ' . $_POST['count'] . ';' . "\n  ";
    }
    if (isset($_POST['categories']) && !empty($_POST['categories'])) {
        sort($_POST['categories']);
        $categories = trim(implode(',', $_POST['categories']), ',');
开发者ID:deanbrabec,项目名称:news_slider,代码行数:31,代码来源:mn-tools.php

示例10: get_snapshot


//.........这里部分代码省略.........
        $tagss_fields = explode(";", $tags_fields);
        sort($tagss_fields);
        $fields = array_unique(array_merge($metadatas_fields, $usess_fields, $tagss_fields));
        if (!in_array("hasRepurposingContext", $fields)) {
            $fields[] = "hasRepurposingContext";
        }
        //in order to return the "repurposedFrom" part as well, used for Replinks
        $finalresults = array();
        foreach ($fields as $field) {
            if ($field == "seeAlso" || $field == "type") {
                continue;
            }
            //the first one is included by default, the second causes error
            $address = $address_base . "mdc:{$field}";
            //I can't put all the fields together right now, since it will return only the resources that have all those fields, so I do a query field after field and then I make the union of the results
            $rdf_info = connectToSesame($address);
            $medParser = new MeducatorParser($rdf_info, true);
            $results = $medParser->results;
            foreach ($results as $key => $result) {
                if (array_key_exists($key, $finalresults)) {
                    $finalresults[$key] = array_merge($finalresults[$key], $result);
                } else {
                    $finalresults[$key] = $result;
                }
            }
        }
        //$b=print_r($finalresults,true);
        //file_put_contents("bbbb",$b);
        if (count($finalresults) > 0) {
            //we have to create a LearningResource object for each result and insert metadata into it
            foreach ($finalresults as $id => $data) {
                $seeAlso = $data["seeAlso"];
                if (is_array($seeAlso)) {
                    $values = array_unique(get_values($seeAlso, "seeAlso"));
                    foreach ($values as $value) {
                        if (strrchr($value, "#") != FALSE) {
                            $guid = substr(strrchr($value, "#"), 1);
                            break;
                        }
                    }
                } else {
                    $guid = substr(strrchr($seeAlso, "#"), 1);
                }
                $entity = get_entity($guid);
                //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                if (empty($entity)) {
                    continue;
                }
                //this is a temporary check from the database since we still need it in order not to have problem with the normal search that still takes info from it
                //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                $lr[$guid] = new LearningResource();
                $lr[$guid]->setName($entity->get('name'));
                $lr[$guid]->setUsername($entity->get('username'));
                $lr[$guid]->setGUID($guid);
                //we extract the important part from each field and insert in the $lr[$guid] object
                foreach ($fields as $field) {
                    $notused = array("type", "hasRepurposingContext");
                    if (in_array($field, $notused)) {
                        continue;
                    }
                    //"type" is more difficult to handle, anyway we don't need it; "hasRepurposingContext" is used later for Replinks
                    $value = "";
                    if (!is_array($data[$field])) {
                        $value = $data[$field];
                    } elseif (isset($data[$field]["name"])) {
                        $value = $data[$field]["name"];
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:67,代码来源:procedures_retrieve.php

示例11: file

} else {
    $admin_tmpl['form_add_posts'] = false;
    $admin_tmpl['form_posts_list'] = true;
    if (file_exists(MN_ROOT . $file['posts'])) {
        # read posts file
        $p_file = file(MN_ROOT . $file['posts']);
        $posts_result = '';
        $timestamps_all = array();
        array_shift($p_file);
        $p_file = mn_natcasesort($p_file);
        $p_file = array_reverse($p_file, true);
        $categories = load_basic_data('categories');
        $users = load_basic_data('users');
        # put posts to arrays - one array for IDs, one for timestamps
        foreach ($p_file as $p_line) {
            $temp_var = get_values('posts', $p_line, false);
            if ($auth != 1 && $temp_var['author'] != $_SESSION['mn_user_id']) {
                continue;
            }
            $temp_var['tags_array'] = !empty($temp_var['tags']) ? explode(',', trim($temp_var['tags'])) : array();
            $timestamps_all[$temp_var['timestamp']] = date('Y-m', $temp_var['timestamp']);
            if (isset($_GET['c']) && !empty($_GET['c']) && $temp_var['cat'] != $_GET['c']) {
                continue;
            }
            if (isset($_GET['d']) && !empty($_GET['d']) && date('Y-m', $temp_var['timestamp']) != $_GET['d']) {
                continue;
            }
            if (isset($_GET['a']) && !empty($_GET['a']) && $temp_var['author'] != $_GET['a']) {
                continue;
            }
            if (isset($_GET['s']) && !empty($_GET['s']) && $temp_var['status'] != $_GET['s']) {
开发者ID:deanbrabec,项目名称:news_slider,代码行数:31,代码来源:mn-posts.php

示例12: load_basic_data

$admin_tmpl['cats_main'] = true;
$categories = load_basic_data('categories');
if (file_exists($file['categories_order'])) {
    $categories_order = unserialize(file_get_contents($file['categories_order']));
} else {
    $categories_order = array();
    $i = 1;
    foreach ($categories as $id => $cname) {
        $categories_order[$i] = $id;
        $i++;
    }
    mn_put_contents($file['categories_order'], serialize($categories_order));
}
$posts_count = get_posts_count();
if (isset($_REQUEST['action']) && isset($_REQUEST['id'])) {
    $var = get_values('categories', $_REQUEST['id']);
}
if (isset($_GET['action']) && $_GET['action'] == 'ajaxcall') {
    if (isset($_GET['cat_name']) && !empty($_GET['cat_name']) && !in_array($_GET['cat_name'], $categories)) {
        if (file_exists($file['categories'])) {
            $cats_file = file($file['categories']);
            $cats_file_lines = '';
            foreach ($cats_file as $single_line) {
                $cat_data = explode(DELIMITER, $single_line);
                if (substr($cat_data[0], 0, 2) == '<?') {
                    $auto_increment_id = trim($cat_data[1]);
                } else {
                    $cats_file_lines .= $single_line;
                }
            }
        } else {
开发者ID:deanbrabec,项目名称:news_slider,代码行数:31,代码来源:mn-categories.php

示例13: dirname

include_once dirname(__FILE__) . "/../../config/environment.php";
require_library('ResourceDataObjectElementsSetting');
$timestart = time_elapsed();
$resource_id = 20;
$resource_path = "http://www.pensoft.net/J_FILES/EoLData/ZooKeys.xml";
$result = $GLOBALS['db_connection']->select("SELECT accesspoint_url FROM resources WHERE id={$resource_id}");
if ($result && ($row = $result->fetch_row())) {
    $resource_path_from_registry = $row[0];
    if ($resource_path != $resource_path_from_registry && $resource_path_from_registry != '') {
        $resource_path = $resource_path_from_registry;
    }
}
echo "\n processing resource: {$resource_path} \n";
if ($local_path = Functions::save_remote_file_to_local($resource_path, array('download_wait_time' => 1000000, 'timeout' => 600, 'download_attempts' => 5))) {
    $func = new ResourceDataObjectElementsSetting($resource_id, $local_path);
    $dataObjects = get_values($local_path);
    $xml = remove_elements($local_path);
    $func->save_resource_document($xml);
    $resource_path = CONTENT_RESOURCE_LOCAL_PATH . $resource_id . ".xml";
    $xml = fill_up_values($resource_path, $dataObjects);
    $func->save_resource_document($xml);
    Functions::set_resource_status_to_force_harvest($resource_id);
    // remove tmp file
    unlink($local_path);
    debug("\n temporary file removed: [{$local_path}]");
}
$elapsed_time_sec = time_elapsed() - $timestart;
echo "\n";
echo "elapsed time = {$elapsed_time_sec} seconds             \n";
echo "elapsed time = " . $elapsed_time_sec / 60 . " minutes  \n";
echo "elapsed time = " . $elapsed_time_sec / 60 / 60 . " hours \n";
开发者ID:eliagbayani,项目名称:maps_test,代码行数:31,代码来源:20.php

示例14: substr

        $temperatures_connect = $temperatures_connect . ',' . $temperatures[$i];
        $ozones_connect = $ozones_connect . ',' . $ozones[$i];
        $no2s_connect = $no2s_connect . ',' . $no2s[$i];
        $humiditys_connect = $humiditys_connect . ',' . $humiditys[$i];
        $carbon_monoxide_connect = $carbon_monoxide_connect . ',' . $carbon_monoxide[$i];
    }
    //delete the first sign, here a comma.
    $names_connect = substr($names_connect, 1);
    $dates_connect = substr($dates_connect, 1);
    $times_connect = substr($times_connect, 1);
    $temperatures_connect = substr($temperatures_connect, 1);
    $ozones_connect = substr($ozones_connect, 1);
    $no2s_connect = substr($no2s_connect, 1);
    $humiditys_connect = substr($humiditys_connect, 1);
    $carbon_monoxide_connect = substr($carbon_monoxide_connect, 1);
    //echo $names_connect;
    //$all_values is an array containing a string for every parameter as mentioned above.
    $all_values = array();
    array_push($all_values, $names_connect);
    array_push($all_values, $dates_connect);
    array_push($all_values, $times_connect);
    array_push($all_values, $temperatures_connect);
    array_push($all_values, $ozones_connect);
    array_push($all_values, $no2s_connect);
    array_push($all_values, $humiditys_connect);
    array_push($all_values, $carbon_monoxide_connect);
    return $all_values;
}
$dies = get_id_coord();
$test = get_values($dies);
开发者ID:nvh3010,项目名称:Semvis-Air,代码行数:30,代码来源:pg_value_functions.php

示例15: friendly_url

        $galleries_file_content .= $auto_increment_id . DELIMITER . $_GET['gallery_name'] . DELIMITER . friendly_url($_GET['gallery_name']) . "\n";
        if (mn_put_contents($file['galleries'], $galleries_file_content)) {
            echo '<li><input type="checkbox" name="galleries[]" id="gallery-' . $auto_increment_id . '" class="input-gallery" value="' . $auto_increment_id . '" checked="checked" /> <label for="gallery-' . $auto_increment_id . '">' . substr($_GET['gallery_name'], 0, 20) . '</label></li>';
            die;
        } else {
            echo 'Error MN#44: cannot write to mn-galleries.php file!';
        }
        die;
    } else {
        echo '';
    }
    die;
}
$auth = user_auth('5');
if (isset($_REQUEST['action']) && isset($_REQUEST['id'])) {
    $var = get_values('galleries', $_REQUEST['id']);
}
if (isset($_POST['action']) && $_POST['action'] == 'add') {
    if (!empty($_POST['gallery_name'])) {
        if (file_exists($file['galleries'])) {
            $galleries_file = file($file['galleries']);
            $galleries_file_lines = '';
            foreach ($galleries_file as $single_line) {
                $gallery_data = explode(DELIMITER, $single_line);
                if (substr($gallery_data[0], 0, 2) == '<?') {
                    $auto_increment_id = trim($gallery_data[1]);
                } else {
                    $galleries_file_lines .= $single_line;
                }
            }
        } else {
开发者ID:deanbrabec,项目名称:news_slider,代码行数:31,代码来源:mn-galleries.php


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