Exemplo n.º 1
0
function get_type($dbc, $name)
{
    $types = get_types($dbc, $name);
    if (count($types) == 0) {
        return '事物';
    } else {
        return $types[0];
    }
}
Exemplo n.º 2
0
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);
        }
    }
}
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;
}
Exemplo n.º 4
0
    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';
Exemplo n.º 5
0
 /**
  * 广告修改
  */
 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');
     }
 }
Exemplo n.º 6
0
                    <?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>
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 
}
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>
            <input type="number" name="hotspot_attempts" id="hotspot_attempts" placeholder="1" required />
	      </div>
	    </div>
	    <div class="ui form">
	      <div class="field">
	        <label for="type_id">Select a Type</label>
	        <select name="type_id">
                 <?php 
    foreach ($types as $type) {
        ?>
					 <option value="<?php 
        echo $type->id;
        ?>
"><?php 
        echo $type->name;
        ?>
</option>
				 <?php 
    }
    ?>
			</select>
	      </div>
	    </div>
	    <div class="ui form">
	      <div class="field">
	        <label for="hotspot_domain_id">Select a Domain</label>
	        <select name="hotspot_domain_id">
				 <option value="NA">...</option>
                 <?php 
    foreach ($domains as $domain) {
        ?>
					<option value="<?php 
        echo $domain->id;
        ?>
"><?php 
        echo $domain->name;
        ?>
</option>
  				 <?php 
    }
    ?>
			</select>
	      </div>
	    </div>
	    <div class="ui form">
	      <div class="field">
	        <label for="hotspot_modal_url">Hotspot Modal Url</label>
	        <input type="text" name="hotspot_modal_url" id="hotspot_modal_url" placeholder="" value="" required />
	      </div>
	    </div>
	    <?php 
    submit_button();
    ?>
	</div>
</form>
</div>
<?php 
}
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{
        jQuery('#hotspot_menu_name').val('');
        jQuery('#menu_name_input').hide();
      }
    });

    // Updating hotspot size value according to slide
    jQuery('#hotspot_size').on('input', function(){
      jQuery('#size_value').val(jQuery(this).val());
    });
  });
</script>
<h2>Edit a Hotspot!</h2>
<hr>

<?php 
    if (isset($_GET['settings-saved'])) {
        ?>
<div class="updated"><p>Hotspot updated successfully.</p></div>
<?php 
    } elseif (isset($_GET['error'])) {
        ?>
<div class="error"><p>Error updating hotspot.</p></div>
<?php 
    }
    ?>

<form id="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="edit_hotspot" />
  <input type="hidden" name="hotspot_id" value="<?php 
    echo $hotspot->get_id();
    ?>
" />
  <input type="hidden" name="mission_id" value="<?php 
    echo $hotspot->get_mission_id();
    ?>
"/>
  <input type="hidden" name="hotspot_domain_id" value="<?php 
    echo $hotspot->get_domain_id();
    ?>
"/>
  <input type="hidden" id="hotspot_type" name="hotspot_type" value="<?php 
    echo $hotspot_type;
    ?>
" />
  <textarea style="display:none;" name="hotspot_xml" > <?php 
    echo $hotspot->get_xml();
    ?>
 </textarea>
  <textarea style="display:none;" name="hotspot_action_xml" > <?php 
    echo $hotspot->get_action_xml();
    ?>
</textarea>
  <div class="ui form segment new_pano_form">
    <div class="ui form">
      <div class="field">
        <label for="hotspot_name">Hotspot Name</label>
        <input type="text" name="hotspot_name" id="name" value="<?php 
    echo $hotspot->get_name();
    ?>
" required />
      </div>
    </div>
    <div class="ui form">
      <div class="field">
        <label for="hotspot_info">Hotspot Info</label>
        <textarea name="hotspot_info" required > <?php 
    echo $hotspot->get_hotspot_info();
    ?>
 </textarea>
      </div>
    </div>
    <div class="ui form">
      <div class="field">
        <label for="hotspot_menu">
          <input type="checkbox" id="hotspot_menu" name="hotspot_menu" <?php 
    echo $hotspot_menu ? 'checked' : '';
    ?>
 />
          <span>Show hotspot on the menu</span>
        </label>
      </div>
    </div>
    <div class="ui form">
      <div class="field">
        <label for="hotspot_menu_name">Hotspot Menu Text</label>
        <input type="text" name="hotspot_menu_name" id="name" value="<?php 
    echo $hotspot->get_menu_name();
    ?>
" required />
      </div>
    </div>

    <?php 
    if ($show_type_edit) {
        ?>
    <p>Type of URL</p>
    <div class="ui form">
      <div class="field">
        <label for="website">
          <input type="radio" class="url_type" name="url_type" id="website" value="website" <?php 
        echo $hotspot_type == 'website' ? 'checked' : '';
        ?>
 />
          <span>Website</span>
        </label>
        <label for="image">
          <input type="radio" class="url_type" name="url_type" id="image" value="image" <?php 
        echo $hotspot_type == 'image' ? 'checked' : '';
        ?>
 />
          <span>Image</span>
        </label>
        <label for="video">
          <input type="radio" class="url_type" name="url_type" id="video" value="video" <?php 
        echo $hotspot_type == 'video' ? 'checked' : '';
        ?>
 />
          <span>Video</span>
        </label>
        <label for="oppia">
          <input type="radio" class="url_type" name="url_type" id="oppia" value="oppia" <?php 
        echo $hotspot_type == 'oppia' ? 'checked' : '';
        ?>
 />
          <span>Oppia</span>
        </label>
      </div>
    </div>
    <div id="website_input" class="ui form">
      <div class="field">
        <label for="hotspot_url">Hotspot URL</label>
        <input type="text" id="hotspot_url" name="hotspot_url" />
      </div>
    </div>
    <div id="oppia_input" class="ui form">
      <div class="field">
        <label for="oppia_id">Oppia ID</label>
        <input type="text" id="oppia_id" name="oppia_id" />
      </div>
    </div>
    <?php 
    }
    ?>

    <div class="ui form">
      <div class="field">
        <label for="hotspot_points">Hotspot Points</label>
        <input type="number" name="hotspot_points" id="hotspot_points" value="<?php 
    echo $hotspot->get_points();
    ?>
" required />
      </div>
    </div>
    <div class="ui form">
      <div class="field">
        <label for="hotspot_icon">
          <input type="checkbox" id="hotspot_icon" name="hotspot_icon" checked />
          <span>Make hotspot icon visible</span>
        </label>
      </div>
    </div>
    <div id="size_input" class="ui form">
      <div class="field">
        <label for="hotspot_size">
          <span>Hotspot size</span>
          <input type="range" id="hotspot_size" name="hotspot_size" min="1" max="500" step="1" value="125" />
          <output for="hotspot_size" id="size_value">125</output>
          <span> px</span>
        </label>
      </div>
    </div>
    <div id="zoom_input" class="ui form">
      <div class="field">
        <label for="hotspot_zoom">
          <input type="checkbox" id="hotspot_zoom" name="hotspot_zoom" checked />
          <span>Hotspot icon zoom with panorama</span>
        </label>
      </div>
    </div>
    <div class="ui form">
      <div class="field">
        <label for="max_attempts">Maximum number of attempts (0 for unlimited)</label>
        <input type="number" name="max_attempts" id="max_attempts" value="<?php 
    echo $hotspot->get_attempts();
    ?>
" required />
      </div>
    </div>
    <?php 
    submit_button();
    ?>
  </div>
</form>

<?php 
}
Exemplo n.º 10
0
	/**
	 * 广告修改
	 */
	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');
		}
	}
Exemplo n.º 11
0
    </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>
Exemplo n.º 12
0
 /**
  * 广告修改
  */
 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');
     }
 }
Exemplo n.º 13
0
}
// 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) {
Exemplo n.º 14
0
    <?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);
Exemplo n.º 15
0
 private function template_type()
 {
     Loader::helper('poster:global');
     return get_types();
 }
Exemplo n.º 16
0
 private function template_type()
 {
     pc_base::load_app_func('global', 'poster');
     return get_types();
 }
Exemplo n.º 17
0
        $result = mysqli_query($dbc, $query) or die('Error querying database1.');
        if ($row = mysqli_fetch_array($result)) {
            $id = $row[id];
            $def = $row[def];
        } else {
            //  render_warning('无相关实体信息!');
        }
    } else {
        //render_warning('无相关实体信息!');
    }
}
if (isset($_GET['type'])) {
    $entity_type = $_GET['type'];
    $types_string = $entity_type;
} else {
    $types = get_types($dbc, $id);
    $entity_type = $types[0];
    $types_string = implode(',', $types);
}
$keywords = $file_id;
?>


<div class="container">
    <?php 
include_once 'entity_search_form.php';
?>



Exemplo n.º 18
0
function pano_hotspot_settings_page()
{
    $hotspots = get_hotspots();
    $panos = get_panos();
    $types = get_types();
    $semantic = WP_PLUGIN_URL . '/panomanager/css/semantic.css';
    $hotspot_types = admin_url() . "admin.php?page=pano_hotspot_type_settings";
    $new_hotspot_url = admin_url() . "admin.php?page=new_hotspot_settings";
    $edit_hotspot_url = admin_url() . "admin.php?page=edit_hotspot_settings";
    $pano_editor = admin_url() . "admin.php?page=view_panos_settings";
    ?>

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

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

<div>
    <h2>Hotspots</h2>
    <p>Filter hotspots by:</p>
    <label>Pano </label>
    <select id="pano_select">
        <option value="NA">Select a pano</option>
        <?php 
    foreach ($panos as $pano) {
        ?>
            <option value="<?php 
        echo $pano->id;
        ?>
"><?php 
        echo $pano->title;
        ?>
</option>
        <?php 
    }
    ?>
    </select>

    <label>Hotspot Type </label>
    <select id="type_select">
        <option value="NA">Select a type</option>
        <?php 
    foreach ($types as $type) {
        ?>
            <option value="<?php 
        echo $type->id;
        ?>
"><?php 
        echo $type->name;
        ?>
</option>
        <?php 
    }
    ?>
    </select>
</div>
<table id="hostpotTable" class="ui table segment tablesorter">
    <thead>
      <tr>
        <th>Pano</th>
        <th>Hotspot</th>
        <th>Menu Name</th>
        <th>Hotspot Info</th>
        <th>Points</th>
        <th>Attempts</th>
        <th>Type</th>
        <th>Edit</th>
        <th>Delete</th>
      </tr>
    </thead>

    <tbody>
        <?php 
    foreach ($hotspots as $hotspot) {
        ?>
            <?php 
        $current_hotspot = build_hotspot($hotspot->id);
        ?>
            <tr class="hotspot pano<?php 
        echo $hotspot->pano_id;
        ?>
 type<?php 
        echo $hotspot->type_id;
        ?>
">
                <td><?php 
        echo get_pano($hotspot->pano_id)->title;
        ?>
</td>
                <td><?php 
        echo $current_hotspot->get_name();
        ?>
</td>
                <td><?php 
        echo $current_hotspot->get_menu_name();
        ?>
</td>
                <td><?php 
        echo substr($current_hotspot->get_hotspot_info(), 0, 20) . "...";
        ?>
</td>
                <td><?php 
        echo $current_hotspot->get_points();
        ?>
</td>
                <td><?php 
        echo $current_hotspot->get_attempts();
        ?>
</td>
                <td><?php 
        echo $current_hotspot->get_type_name();
        ?>
</td>
                <td><a class="ui blue icon button" href="<?php 
        echo $edit_hotspot_url;
        ?>
&id=<?php 
        echo $current_hotspot->get_id();
        ?>
" style="padding: 7px">Edit</a></td>
                <td>
                    <form method="post" action="admin-post.php" id="delete_hotspot_form<?php 
        echo $current_hotspot->get_id();
        ?>
">
                        <!-- pano processing hook -->
                        <input type="hidden" name="action" value="delete_hotspot" />
                        <input type="hidden" name="hotspot_id" value="<?php 
        echo $current_hotspot->get_id();
        ?>
" />

                        <input type="submit" class="ui blue icon button" value="Delete" style="padding: 7px" >
                    </form>
                </td>
            </tr>
        <?php 
    }
    ?>
    </tbody>
</table>
<form method="POST" action="<?php 
    echo $pano_editor;
    ?>
&">
    <!-- word processing hook -->
    <input type="submit" class="ui blue icon button" value="Create Hotspot" style="padding: 7px;" />
</form>
<br/>

<script>
    jQuery(document).ready(function(){
        jQuery("#hostpotTable").tablesorter();


        jQuery("#pano_select").change( function() {
            filter_hotspots();
        });

        jQuery("#type_select").change( function(){
            filter_hotspots();
        });

        function filter_hotspots() {
            var pano = jQuery("#pano_select").prop("value");

            var type = jQuery("#type_select").prop("value");


            if (pano == "NA" && type == "NA") {
                jQuery(".hotspot").show();
            } else if (pano == "NA" && type != "NA") {
                jQuery(".hotspot").hide();
                jQuery(".type" + type).show();
            } else if (pano != "NA" && type == "NA") {
                jQuery(".hotspot").hide();
                jQuery(".pano" + pano).show();
            } else {
                jQuery(".hotspot").hide();
                jQuery(".pano" + pano + ".type" + type).show();
            }
        }
    })
</script>


<?php 
}