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


PHP get_types函数代码示例

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


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

示例1: get_type

function get_type($dbc, $name)
{
    $types = get_types($dbc, $name);
    if (count($types) == 0) {
        return '事物';
    } else {
        return $types[0];
    }
}
开发者ID:sdgdsffdsfff,项目名称:docs-1,代码行数:9,代码来源:graph_helper.php

示例2: render_graph

function render_graph($dbc, $name, $ontology)
{
    $types = get_types($dbc, $name);
    foreach ($types as $type) {
        $properties = $ontology[$type];
        foreach ($properties as $property) {
            render_graph_by_property($dbc, $name, $property);
        }
    }
}
开发者ID:sdgdsffdsfff,项目名称:aristotle,代码行数:10,代码来源:entity.php

示例3: get_type_select_options

function get_type_select_options($default = "1")
{
    $str = "";
    $json = json_decode(get_types());
    $str .= '<option value="">wie Album</option>';
    $str .= '<option value="1" ';
    if ($default == "1") {
        $str .= "selected ";
    }
    $str .= '>bitte w&auml;hlen</option>';
    $str .= "\n";
    foreach ($json as $type) {
        $str .= '<option value="' . $type->id . '" ';
        if ((string) $type->id == $default) {
            $str .= "selected";
        }
        $str .= ' >';
        $str .= $type->musictype . '</option>';
        $str .= "\n";
    }
    return $str;
}
开发者ID:BackupTheBerlios,项目名称:gdrestfulwebint-svn,代码行数:22,代码来源:inc.helpers.php

示例4: escape

    if (empty($errors)) {
        if ($_POST['show_preview'] == 'true') {
            $smarty->assign('show_preview', true);
        } else {
            escape($_POST, array('description'));
            $data = array('company' => $company, 'url' => $url, 'title' => $title, 'summary' => $summary, 'city_id' => $city_id, 'category_id' => $category_id, 'type_id' => $type_id, 'description' => $description, 'location_outside_ro_where' => $isCitySelected ? '' : $location_outside_ro_where, 'apply' => '', 'poster_email' => $poster_email, 'apply_online' => $apply_online);
            if ($id != 0) {
                $job->Edit($data);
            } else {
                // a job posted by the admin is active from the beginning
                $data['is_temp'] = 0;
                $data['is_active'] = 1;
                $data['spotlight'] = 0;
                if ($jobId = $job->Create($data)) {
                    Subscriber::sendJob($jobId);
                }
            }
            $category = get_category_by_id($category_id);
            redirect_to(BASE_URL . URL_JOBS . '/' . $category['var_name'] . '/');
            exit;
        }
    } else {
        $smarty->assign('errors', $errors);
    }
}
$smarty->assign('job', $jobToEdit);
$smarty->assign('categories', get_categories());
$smarty->assign('types', get_types());
$smarty->assign('cities', get_cities());
$html_title = $translations['jobs']['title_edit'] . ' / ' . SITE_NAME;
$template = 'edit-post.tpl';
开发者ID:zeamxie,项目名称:jobberbase,代码行数:31,代码来源:page_edit_post.php

示例5: edit

 /**
  * 广告修改
  */
 public function edit()
 {
     $_GET['id'] = intval($_GET['id']);
     if (!$_GET['id']) {
         showmessage(L('illegal_action'), HTTP_REFERER);
     }
     if (isset($_POST['dosubmit'])) {
         $poster = $this->check($_POST['poster']);
         $setting = $this->check_setting($_POST['setting'], $poster['type']);
         $poster['setting'] = array2string($setting);
         $this->db->update($poster, array('id' => $_GET['id'], 'siteid' => $this->get_siteid()));
         $this->create_js(intval($_GET['spaceid']));
         foreach ($setting as $im) {
             $imgs[] = $im['imageurl'];
         }
         if (pc_base::load_config('system', 'attachment_stat')) {
             $this->attachment_db = pc_base::load_model('attachment_model');
             $this->attachment_db->api_update($imgs, 'poster-' . $_GET['id'], 1);
         }
         showmessage(L('edit_ads_success'), 'index.php?m=poster&c=poster&a=init&spaceid=' . $_GET['spaceid']);
     } else {
         $info = $this->db->get_one(array('id' => $_GET['id'], 'siteid' => $this->get_siteid()));
         $sinfo = $this->s_db->get_one(array('spaceid' => $info['spaceid'], 'siteid' => $this->get_siteid()), 'name, type');
         $setting = $this->get_setting($sinfo['type']);
         $TYPES = get_types();
         $info['setting'] = string2array($info['setting']);
         $default = count($setting) > 0 ? L('please_select') . '&nbsp;&nbsp;&nbsp;&nbsp;' : '';
         $big_menu = array('javascript:window.top.art.dialog({id:\'add\',iframe:\'?m=poster&c=space&a=add\', title:\'' . L('add_space') . '\', width:\'540\', height:\'320\'}, function(){var d = window.top.art.dialog({id:\'add\'}).data.iframe;var form = d.document.getElementById(\'dosubmit\');form.click();return false;}, function(){window.top.art.dialog({id:\'add\'}).close()});void(0);', L('add_space'));
         pc_base::load_sys_class('form', '', 0);
         include $this->admin_tpl('poster_edit');
     }
 }
开发者ID:zhangjSir,项目名称:JinMaSite,代码行数:35,代码来源:poster.php

示例6: form_dropdown

                    <?php 
echo form_dropdown('colour_id', get_colours(), set_value('colour_id', $car['colour_id']));
?>
                    <?php 
echo form_error('colour_id', '<span class="error_text">', '</span>');
?>
                </div>
            </div>

            <div class="basic-grey">
                <div class="left">
                    <label>Type</label>
                </div>
                <div class="right">
                    <?php 
echo form_dropdown('type_id', get_types(), set_value('type_id', $car['type_id']));
?>
                    <?php 
echo form_error('type_id', '<span class="error_text">', '</span>');
?>
                </div>
            </div>

            <div class="basic-grey">
                <div class="left">
                    &nbsp;
                </div>
                <div class="right">
                    <input type="submit" class="button" value="Add"/>
                </div>
            </div>
开发者ID:ram-1501,项目名称:rs,代码行数:31,代码来源:car_add.php

示例7: pano_hotspot_type_settings_page

function pano_hotspot_type_settings_page()
{
    $semantic = WP_PLUGIN_URL . '/panomanager/css/semantic.css';
    $hotspot_types = get_types();
    $new_hotspot_type_url = admin_url() . "admin.php?page=new_hotspot_type_settings";
    $edit_hotspot_type_url = admin_url() . "admin.php?page=edit_hotspot_type_settings";
    ?>

<!-- style sheet so our admin page looks nice -->
<link rel="stylesheet" type="text/css" href="<?php 
    echo $semantic;
    ?>
"/>
<p>Manage your missions!</p>
<hr>

<?php 
    if (isset($_GET['settings-saved'])) {
        ?>
        <div class="updated"><p>Settings updated successfully.</p></div>
    <?php 
    }
    ?>

<div>
    <h2>Hotspot Types</h2>
</div>
<table class="ui table segment">
  <tr>
    <th>Type</th>
    <th>Info</th>
    <th>Edit</th>
    <th>Delete</th>
  </tr>
  <?php 
    foreach ($hotspot_types as $hotspot_type) {
        ?>

    <tr>
        <td><?php 
        echo $hotspot_type->name;
        ?>
</td>
        <td><?php 
        echo $hotspot_type->description;
        ?>
</td>
        <td><a class="ui blue icon button" href="<?php 
        echo $edit_hotspot_type_url;
        ?>
&id=<?php 
        echo $hotspot_type->id;
        ?>
" style="padding: 7px">Edit</a></td>
        <td>
            <form method="post" action="admin-post.php" id="delete_hotspot_type_form<?php 
        echo $hotspot_type->id;
        ?>
">
                <!-- pano processing hook -->
                <input type="hidden" name="action" value="delete_hotspot_type" />
                <input type="hidden" name="hotspot_type_id" value="<?php 
        echo $hotspot_type->id;
        ?>
" />

                <input type="submit" class="ui blue icon button" value="Delete" style="padding: 7px" >
            </form>
        </td>
    </tr>

<?php 
    }
    ?>
</table>
<a class="ui blue icon button" href="<?php 
    echo $new_hotspot_type_url;
    ?>
" style="padding: 7px">New Hotspot Type</a>
</div>

<?php 
}
开发者ID:Trying-On-The-Trades,项目名称:panomanager,代码行数:83,代码来源:hotspot_types.php

示例8: new_hotspot_settings_page

function new_hotspot_settings_page()
{
    $semantic = WP_PLUGIN_URL . '/panomanager/css/semantic.css';
    $missions = get_missions();
    $types = get_types();
    $domains = get_domains();
    ?>
<link rel="stylesheet" type="text/css" href="<?php 
    echo $semantic;
    ?>
"/>
<h2>Create a new hotspot!</h2>
<hr>
<style type="text/css">
	#wpfooter{
		display: none;
	}

	#file_input {
	    border: 1px solid #cccccc;
	    padding: 5px;
	}

	.new_pano_form{
		width:85%;
		margin: 0px auto;
	}
</style>
<form method="post" enctype="multipart/form-data" action="<?php 
    echo get_admin_url() . 'admin-post.php';
    ?>
">
    <!-- pano processing hook -->
    <input type="hidden" name="action" value="create_new_hotspot" />
    <div class="ui form segment new_pano_form">
	    <div class="ui form">
	      <div class="field">
	        <label for="mission_id">Select a Mission</label>
	        <select name="mission_id">
                 <?php 
    foreach ($missions as $mission) {
        ?>
                    <option value="<?php 
        echo $mission->mission_id;
        ?>
"><?php 
        echo $mission->name;
        ?>
</option>
                 <?php 
    }
    ?>
            </select>
	      </div>
	    </div>
	    <div class="ui form">
	      <div class="field">
            <label for="hotspot_name">Hotspot Name</label>
            <input type="text" name="hotspot_name" id="name" placeholder="Fun Hotspot" required />
	      </div>
	    </div>
	    <div class="ui form">
	      <div class="field">
	        <label for="hotspot_menu_name">Hotspot Menu Name</label>
            <input type="text" name="hotspot_menu_name" id="name" placeholder="Find Hotspot" required />
	      </div>
	    </div>
	    <div class="ui form">
	      <div class="field">
	        <label for="hotspot_description">Hotspot Description</label>
	        <textarea name="hotspot_description" required ></textarea>
	      </div>
	    </div>
	    <div class="ui form">
	      <div class="field">
	        <label for="hotspot_info">Hotspot Info</label>
	        <textarea name="hotspot_info" required ></textarea>
	      </div>
	    </div>
	    <div class="ui form">
	      <div class="field">
	        <label for="hotspot_xml">Hotspot XML</label>
	        <textarea name="hotspot_xml" required ></textarea>
	      </div>
	    </div>
	    <div class="ui form">
	      <div class="field">
	        <label for="hotspot_action_xml">Hotspot Action XMl</label>
	        <textarea name="hotspot_action_xml" required ></textarea>
	      </div>
	    </div>
	    <div class="ui form">
	      <div class="field">
            <label for="hotspot_points">Points</label>
            <input type="number" name="hotspot_points" id="hotspot_points" placeholder="10" required />
	      </div>
	    </div>
	    <div class="ui form">
	      <div class="field">
            <label for="hotspot_attempts">Attempts</label>
//.........这里部分代码省略.........
开发者ID:Trying-On-The-Trades,项目名称:panomanager,代码行数:101,代码来源:new_hotspot.php

示例9: edit_hotspot_settings_page

function edit_hotspot_settings_page()
{
    $semantic = WP_PLUGIN_URL . '/panomanager/css/semantic.css';
    $missions = get_missions();
    $types = get_types();
    $domains = get_domains();
    $hotspot = null;
    $show_type_edit = false;
    if (isset($_GET['id']) && is_numeric($_GET['id'])) {
        $hotspot = build_hotspot($_GET['id']);
    }
    $hotspot_menu = $hotspot->is_menu_item();
    $hotspot_type_id = $hotspot->get_type_id();
    $hotspot_type_row = get_hotspot_type($hotspot_type_id);
    $hotspot_type = $hotspot_type_row->name;
    if ($hotspot_type == "website" || $hotspot_type == "image" || $hotspot_type == "video" || $hotspot_type == "oppia") {
        $show_type_edit = true;
    }
    ?>

<link rel="stylesheet" type="text/css" href="<?php 
    echo $semantic;
    ?>
"/>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<style type="text/css">
  #wpfooter{
    display: none;
  }

  #file_input {
    border: 1px solid #cccccc;
    padding: 5px;
  }

  .new_pano_form{
    width:85%;
    margin: 0px auto;
  }
</style>
<script type="text/javascript">
  jQuery('#form').ready(function(){
    // Hiding oppia id on startup
    jQuery('#oppia_input').hide();

    // Displaying oppia id or hotspot url input
    //  according to radio button selection
    jQuery('.url_type').change(function(){
      if(jQuery('#oppia').is(':checked')){
        jQuery('#hotspot_url').val('');
        jQuery('#website_input').hide();
        jQuery('#oppia_input').show();
        jQuery('#oppia_id').focus();
      } else {
        jQuery('#oppia_id').val('');
        jQuery('#oppia_input').hide();
        jQuery('#website_input').show();
        jQuery('#hotspot_url').focus();
      }
    });

    // Changing hotspot type value
    //  according to user selection
    jQuery('.url_type').change(function(){
      if(jQuery('#website').is(':checked')){
        jQuery('#hotspot_type').val('website');
      }
      else if(jQuery('#image').is(':checked')){
        jQuery('#hotspot_type').val('image');
      }
      else if(jQuery('#video').is(':checked')){
        jQuery('#hotspot_type').val('video');
      }
      else if(jQuery('#oppia').is(':checked')){
        jQuery('#hotspot_type').val('oppia');
      } else {
        jQuery('#hotspot_type').val('url');
      }
    });

    // Displaying hotspot zoom if user chooses
    //  visible hotspot
    jQuery('#hotspot_icon').change(function(){
      if(jQuery(this).is(':checked')){
        jQuery('#zoom_input').show();
        jQuery('#size_input').show();
      } else {
        jQuery('#hotspot_zoom').prop('checked', false);
        jQuery('#zoom_input').hide();
        jQuery('#size_value').val(125);
        jQuery('#size_input').hide();
      }
    });

    // Displaying hotspot menu name input
    //  if user chooses to be visible
    jQuery('#hotspot_menu').change(function(){
      if(jQuery(this).is(':checked')){
        jQuery('#menu_name_input').show();
      } else{
//.........这里部分代码省略.........
开发者ID:Trying-On-The-Trades,项目名称:panomanager,代码行数:101,代码来源:edit_hotspot.php

示例10: edit

	/**
	 * 广告修改
	 */
	public function edit() {
		$_GET['id'] = intval($_GET['id']);
		if (!$_GET['id']) showmessage(L('illegal_action'), HTTP_REFERER);
		if (isset($_POST['dosubmit'])) {
			$poster = $this->check($_POST['poster']);
			$setting = $this->check_setting($_POST['setting'], $poster['type']);
			$poster['setting'] = array2string($setting);
			$this->db->update($poster, array('id'=>$_GET['id'], 'siteid'=>$this->get_siteid()));
			$this->create_js(intval($_GET['spaceid']));
			foreach ($setting as $im) {
				$imgs[] = $im['imageurl'];
			}
			if(pc_base::load_config('system','attachment_stat')) {
				$this->attachment_db = pc_base::load_model('attachment_model');
				$this->attachment_db->api_update($imgs, 'poster-'.$_GET['id'], 1);
			}
			showmessage(L('operation_success'), HTTP_REFERER, '', 'edit');
		} else {
			
			$info = $this->db->get_one(array('id'=>$_GET['id'], 'siteid'=>$this->get_siteid()));
			$sinfo = $this->s_db->get_one(array('spaceid' => $info['spaceid'], 'siteid'=>$this->get_siteid()), 'name, type');
			$setting = $this->get_setting($sinfo['type']);
			$TYPES = get_types();
			$info['setting'] = string2array($info['setting']);
			$default = count($setting)>0 ? L('please_select').'&nbsp;&nbsp;&nbsp;&nbsp;' : '';
			pc_base::load_sys_class('form', '', 0);
			include $this->admin_tpl('poster_edit');
		}
	}
开发者ID:hxzyzz,项目名称:ddc,代码行数:32,代码来源:poster.php

示例11: get_makes

    </div>

    

    <div class="inner_cont">
    	<h1 style="margin-top:0px;">Your car details</h1>
       
        <?php 
if (count($cars)) {
    ?>
        <table>
            <tbody>
                <?php 
    $makes = get_makes();
    $models = get_models();
    $types = get_types();
    foreach ($cars as $car) {
        $img = $car['img_name'] ? 'assets/uploads/cars/' . $car['img_name'] : 'assets/frontend/images/car.png';
        $btnText = $car['img_name'] ? 'Click here to Change Photo' : 'Upload Photo';
        $details = '<p>';
        $details .= $makes[$car['make_id']] . ' ' . $models[$car['make_id']][$car['model_id']];
        $details .= '<br/>' . $car['seat_count'] . ' seats';
        $details .= '<br/><a href="' . site_url('dashboard/profile/car/edit/' . $car['id']) . '"><img src="' . include_img_path() . '/edit.png" width="15px"></a>';
        $details .= '&nbsp;&nbsp;&nbsp;<a href="' . site_url('dashboard/profile/car/delete/' . $car['id']) . '"><img src="' . include_img_path() . '/del.png" width="15px"></a>';
        echo '<tr>';
        echo '<td> <img width="120px" id="car-' . $car['id'] . '" src="' . base_url($img) . '" /></td>';
        echo '<td>' . $details . '</td>';
        echo '</tr>';
        echo '<tr>';
        echo '  <td colspan="2">
                                    <button id="' . $car['id'] . '" class="button uploadBtn">' . $btnText . '</button>
开发者ID:ram-1501,项目名称:rs,代码行数:31,代码来源:car_list.php

示例12: edit

 /**
  * 广告修改
  */
 public function edit()
 {
     $_GET['id'] = intval($_GET['id']);
     if (!$_GET['id']) {
         showmessage(L('illegal_action'), HTTP_REFERER);
     }
     if (isset($_POST['dosubmit'])) {
         $poster = $this->check($_POST['poster']);
         $setting = $this->check_setting($_POST['setting'], $poster['type']);
         $poster['setting'] = array2string($setting);
         $this->db->where(array('id' => $_GET['id']))->update($poster);
         $this->create_js(intval($_GET['spaceid']));
         foreach ($setting as $im) {
             $imgs[] = $im['imageurl'];
         }
         if (C('attachment', 'stat')) {
             $this->attachment_db = Loader::model('attachment_model');
             $this->attachment_db->api_update($imgs, 'poster-' . $_GET['id'], 1);
         }
         showmessage(L('operation_success'), HTTP_REFERER, '', 'edit');
     } else {
         $info = $this->db->where(array('id' => $_GET['id']))->find();
         $sinfo = $this->s_db->field('name, type')->where(array('spaceid' => $info['spaceid']))->find();
         $setting = $this->get_setting($sinfo['type']);
         $TYPES = get_types();
         $info['setting'] = string2array($info['setting']);
         $default = count($setting) > 0 ? L('please_select') . '&nbsp;&nbsp;&nbsp;&nbsp;' : '';
         include $this->view('poster_edit');
     }
 }
开发者ID:hubs,项目名称:yuncms,代码行数:33,代码来源:PosterController.php

示例13: spliti

}
// Check for the path elements
$path = $_SERVER[PATH_INFO];
if ($path != null) {
    $path_params = spliti("/", $path);
}
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
    // GET Request
    set_headers($type);
    if ($path_params[1] != null) {
        if ($path_params[1] == languages) {
            render_result(get_languages(), "meta", $type);
            /* render language table */
        }
        if ($path_params[1] == types) {
            render_result(get_types(), "meta", $type);
            /* render musictype table */
        }
        if ($path_params[1] == rating) {
            render_result(get_rating(), "meta", $type);
            /* render possible rating values */
        }
        if ($path_params[1] == quality) {
            render_result(get_quality(), "meta", $type);
            /* render possible quality values */
        }
        if ($path_params[1] == genres) {
            render_result(get_genres(), "meta", $type);
            /* render genre table */
        }
        if ($path_params[1] == source) {
开发者ID:BackupTheBerlios,项目名称:gdrestfulwebint-svn,代码行数:31,代码来源:meta.php

示例14: foreach

    <?php 
echo '<ul class="nav nav-pills">';
echo '<li ><a  href="synthesis_lit_graph.php?name=' . $name . '">综合知识</a></li>';
foreach ($db_labels as $db => $db_label) {
    echo '<li ' . ($db == $db_name ? 'class="disabled"' : '') . '><a href="' . $_SERVER['PHP_SELF'] . "?name={$name}&db_name=" . $db . '">' . $db_label . '</a></li>';
}
echo '<li><a href="#">更多>></a></li>';
echo '</ul>';
?>


    <h1>  
        <font face="微软雅黑"><strong>
            <?php 
echo $name . '(' . implode(',', get_types($dbc, $id)) . ')';
?>
       
        </strong>
        </font>
    </h1>

    <?php 
if (isset($name) && $name != '') {
    $values = array();
    $db_labels = array("tcmls" => "TCMLS", "tcmct" => "TCMCT", "clan" => "古籍语言", "spleen" => "证候库");
    foreach ($db_labels as $db_name => $db_label) {
        $db = $dbs["{$db_name}"];
        $dbc = mysqli_connect($db[0], $db[1], $db[2], $db[3]) or die('Error connecting to MySQL server.');
        $query = "select id from def where name ='{$name}'";
        $result = mysqli_query($dbc, $query) or die('Error querying database:' . $query);
开发者ID:sdgdsffdsfff,项目名称:LOD,代码行数:30,代码来源:synthesis_lit_graph.php

示例15: template_type

 private function template_type()
 {
     Loader::helper('poster:global');
     return get_types();
 }
开发者ID:hubs,项目名称:yuncms,代码行数:5,代码来源:SpaceController.php


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