close() public static method

public static close ( )
Example #1
0
 public function edit($url)
 {
     $display_name = ucwords(str_replace('_', ' ', $url));
     $this->__set_heading("Editing Theme file - " . $display_name);
     $view = new View('zest/content');
     $content = form::open('admin/snippets/save/' . $url);
     $html = zest::template_to_html(THEME_PATH . $url);
     $content .= form::label('content', 'Code');
     $content .= '<p><small>This is only for advanced users. To edit <a onclick="$(\'#content\').toggle();return false;" href="#">click here</a></small></p>';
     $content .= form::textarea('content', $html, 'id="content" class="fullWidth no-editor hside"');
     $content .= form::submit('submit', 'Save', 'class="submit"');
     $content .= form::close();
     $view->content = $content;
     $this->__set_content($view);
 }
Example #2
0
 private function __under_development()
 {
     $UNDER_DEVELOPMENT = ORM::factory('setting', 'UNDER_DEVELOPMENT');
     if (isset($_POST['UNDER_DEVELOPMENT'])) {
         $UNDER_DEVELOPMENT->value = $_POST['UNDER_DEVELOPMENT'];
         $UNDER_DEVELOPMENT->save();
     }
     $data = array("name" => "UNDER_DEVELOPMENT", "class" => "fullWidth");
     $options = array(null => "YES", "1" => "NO");
     $selected = $UNDER_DEVELOPMENT->value;
     $html = form::open();
     $html .= form::label('UNDER_DEVELOPMENT', 'Under Development');
     $html .= form::dropdown($data, $options, $selected);
     $html .= form::submit('submit', 'Save', 'class="submit"') . '<p>&nbsp;</p><p>&nbsp;</p>';
     $html .= form::close();
     return $html;
 }
Example #3
0
    public function _form($user)
    {
        $html = "";
        $html .= form::open(null, array('class' => 'valid_form'));
        $html .= form::input(array('email', 'Email'), $user->email, 'class="fullWidth required email"');
        $html .= form::label('New Password');
        $html .= form::password('password[]', '', 'class="fullWidth"');
        $html .= form::label('Repeat Password');
        $html .= form::password('password[]', '', 'class="fullWidth"');
        $html .= "<hr/>";
        $html .= form::label('openid', 'OpenID <img src="http://www.plaxo.com/images/openid/login-bg.gif" />');
        $html .= '<p><small><a href="http://www.openid.net" target="_BLANK">What is an OpenID?</a></small></p>
			<p><small>Please remember the "http://"</small></p>';
        $html .= form::input('openid', $user->openid, 'class="fullWidth url"');
        $html .= form::submit('submit', 'Save', 'class="submit"');
        $html .= form::close();
        return $html;
    }
Example #4
0
 public static function render_form()
 {
     $form = "";
     if (isset($_POST['forgotten_email'])) {
         $user = ORM::factory('user', $_POST['forgotten_email']);
         if ($user->id > 0) {
             $user->reset_password();
             $form .= "<span id='login_error' style='color:red'>Your new password has been emailed to you.</span>";
         } else {
             $form .= "<span id='login_error' style='color:red'>That email is not registered with us.</span>";
         }
     }
     $user = login::attempt_login();
     if (is_object($user)) {
         return "hello " . $user->username . " <a href='?logout'>logout</a>";
     }
     if (is_string($user)) {
         $form .= "<span id='login_error' style='color:red'>{$user}</span>";
     }
     $form .= '<span id="forgotten_password" class="hide">';
     $form .= '<label for="forgotten_email">Email</label>';
     $form .= '<input type="text" name="forgotten_email" value="email" onfocus="if (this.value=\\"email\\") this.value=\\"\\""/>';
     $form .= '<input type="submit" value="login" class="submit" />';
     $form .= form::close();
     $form .= '</span>';
     $form .= '<span id="login_form" class="hide">';
     $form .= form::open();
     $form .= '<label for="username">Username</label>';
     $form .= '<input type="text" name="username" value="username" onfocus="if (this.value=\\"username\\") this.value=\\"\\""/>';
     $form .= '<label for="password">Password</label>';
     $form .= '<input type="password" name="password" value="password" onfocus="if (this.value=\\"password\\") this.value=\\"\\""/>';
     $form .= '<input type="submit" value="login" class="submit" />';
     $form .= form::close();
     $form .= '<a href="#" onclick="$(\'#forgotten_password\').show();$(\'#login_form\').hide()">forgotten password?</a>';
     $form .= '</span>';
     return $form;
 }
Example #5
0
							<span class="sel-holder">
								<?php print form::dropdown('private_deployment', $yesno_array, $form['private_deployment']); ?>
							</span>
						</div>				
						<div class="row">
						<h4><a href="#" class="tooltip" title="<?php echo Kohana::lang("tooltips.settings_google_analytics"); ?>"><?php echo Kohana::lang('settings.site.google_analytics');?></a></h4>
							<?php echo Kohana::lang('settings.site.google_analytics_example');?> &nbsp;&nbsp;
							<?php print form::input('google_analytics', $form['google_analytics'], ' class="text"'); ?>
						</div>
						<div class="row">
							<h4><a href="#" class="tooltip" title="<?php echo Kohana::lang("tooltips.settings_twitter_configuration"); ?>"><?php echo Kohana::lang('settings.site.twitter_configuration');?></a></h4>
							<div class="row">
								<?php echo Kohana::lang('settings.site.twitter_hashtags');?>
								<?php print form::input('twitter_hashtags', $form['twitter_hashtags'], ' class="text"'); ?>
							</div>
						</div>
						<div class="row">
							<h4><?php echo Kohana::lang('settings.site.api_akismet');?></h4>
							<?php echo Kohana::lang('settings.site.kismet_notice');?>.
							<?php print form::input('api_akismet', $form['api_akismet'], ' class="text"'); ?>
						</div>
					</div>
		
					<div class="simple_border"></div>
		
					<input type="image" src="<?php echo url::base() ?>media/img/admin/btn-save-settings.gif" class="save-rep-btn" />
					<input type="image" src="<?php echo url::base() ?>media/img/admin/btn-cancel.gif" class="cancel-btn" />
				</div>
				<?php print form::close(); ?>
			</div>
Example #6
0
File: a2demo.php Project: sars/rp
 private function editor($blog)
 {
     if (count($_POST)) {
         $blog->values($_POST);
         if ($blog->check()) {
             $blog->user_id = $this->a2->get_user()->id;
             $blog->save();
             return $this->action_index();
         }
     }
     //show form
     echo form::open();
     echo 'text:' . form::textarea('text', $blog->text) . '<br>';
     echo form::submit('post', 'post');
     echo form::close();
     echo Kohana::debug($blog->validate()->errors());
 }
Example #7
0
 /**
  * Generate list of currently created Form Fields for the admin interface
  * @param int $form_id The id no. of the form
  * @return string
  */
 public static function get_current_fields($form_id = 0)
 {
     $form_fields = form::open(NULL, array('method' => 'get'));
     $form = array();
     $form['custom_field'] = self::get_custom_form_fields('', $form_id, true);
     $form['id'] = $form_id;
     $custom_forms = new View('reports/submit_custom_forms');
     $disp_custom_fields = self::get_custom_form_fields('', $form_id, false);
     $custom_forms->disp_custom_fields = $disp_custom_fields;
     $custom_forms->form = $form;
     $custom_forms->editor = true;
     $form_fields .= $custom_forms->render();
     $form_fields .= form::close();
     return $form_fields;
 }
Example #8
0
<?php if ($rubros->count()>0) { ?>
<div class="yui-b data">
    <!-- Muestra los rubros -->
    <ul>
            <?php foreach ($rubros as $rubro): ?>
        <li><?php echo $rubro->nombre ?>
            <a href="#"><?=html::image(array('src'=>'media/images/cancel.png',
                            'alt'=>'Borrar','title'=>'Borrar ',
                            'width'=>'16','height'=>'16'))?></a>
        </li>
            <?php endforeach ?>
    </ul>
</div>
<?php } ?>
<div class="yui-b data">
    <!-- Formulario de Carga de Datos -->
    <?=form::open(NULL, array("class"=>"cmxform"))?>
    <?=form::label('rubro','Rubro')?>
    <?=form::hidden('dato_id',$form['dato_id'])?>
    <?=form::dropdown('rubro_id',$form['rubros'], $form['seltipo'])?>
    <?=form::submit(NULL,"Agregar", 'class="awesome small green"')?>
    <?=form::close()?>
    <ul>
        <?php if (isset($_SESSION['urledit'])) {?>
        <li><?php echo html::anchor($_SESSION['urledit'], 'Finalizar carga',array('class'=>'awesome medium blue')) ?></li>
        <?} else { ?>
        <li><?php echo html::anchor('datos', 'Finalizar carga',array('class'=>'awesome medium blue')) ?></li>
        <? } ?>
    </ul>

</div>
Example #9
0
 /**
  * Demonstrates how to use the form helper with the Validation library.
  */
 function form()
 {
     $validation = new Validation();
     echo form::open('', array('enctype' => 'multipart/form-data'));
     echo form::label('imageup', 'Image Uploads') . ':<br/>';
     echo form::upload('imageup[]') . '<br/>';
     echo form::upload('imageup[]') . '<br/>';
     echo form::upload('imageup[]') . '<br/>';
     echo form::submit('upload', 'Upload!');
     echo form::close();
     if (!empty($_POST)) {
         $validation->set_rules('imageup', 'required|upload[gif,png,jpg,500K]', 'Image Upload');
         echo '<p>validation result: ' . var_export($validation->run(), TRUE) . '</p>';
     }
     echo Kohana::debug($validation);
     echo Kohana::lang('core.stats_footer');
 }
Example #10
0
<?php

defined('SYSPATH') or die('No direct access allowed.');
?>

<div id="callmanager_header" class="modules callmanager module_header">
    <h2><?php 
echo __('Hang Up Call');
?>
</h2>
</div>
<?php 
echo form::open();
echo form::hidden('uuid', $uuid);
echo 'Do you really want to hang up this call???';
echo form::close('yes_no');
Example #11
0
?>
									<span><?php 
echo Kohana::lang('ui_main.longitude');
?>
:</span>
									<?php 
print form::input('default_lon', $form['default_lon'], ' readonly="readonly" class="text"');
?>
								</div>
							</div>
							<div style="clear:both;"></div>
							<h4><?php 
echo Kohana::lang('ui_main.preview');
?>
</h4>
							<p class="bold_desc"><?php 
echo Kohana::lang('settings.set_location');
?>
.</p>

							<div id="map_holder">
								<div id="map" class="mapstraction"></div>    
							</div>
							<div style="margin-top:25px" id="map_loaded"></div>
						</div>
					</div>
				<?php 
print form::close();
?>
			</div>
Example #12
0
 public function filter_search()
 {
     $filter_search = "";
     $filter_search .= "<div class=\"filter-search-form\">";
     $filter_search .= "<span id=\"filter-search-title\">" . Kohana::lang('ui_main.search') . "</span>";
     $filter_search .= form::open(NULL, array('method' => 'get', 'id' => 'filter_search'));
     $filter_search .= "<ul>";
     $filter_search .= "<li><input id=\"filter_search_query\" type=\"text\" name=\"q\" value=\"\" class=\"text\" /></li>";
     $filter_search .= "<li><input type=\"submit\" class=\"searchbtn\" value=\"" . Kohana::lang('ui_main.search') . "\" /></li>";
     $filter_search .= "</ul>";
     $filter_search .= form::close();
     $filter_search .= "<div id=\"filter-search-results-box\"><span id=\"filter-search-prompt\">" . Kohana::lang('ui_main.filter_search_prompt') . "</span></div>";
     $filter_search .= "</div>";
     return $filter_search;
 }
Example #13
0
        <div class="field">
        <?php 
echo form::label('location[name]', 'Location Name:');
echo form::input('location[name]');
?>
        </div>

        <div class="field">
        <?php 
echo form::label('location[domain]', 'Domain Name/Realm:');
echo form::input('location[domain]');
?>
        </div>

    <?php 
echo form::close_section();
?>

    <?php 
if (isset($views)) {
    echo subview::renderAsSections($views);
}
?>

    <?php 
echo form::close(TRUE);
?>
    
</div>
Example #14
0
 private function new_page_form($array = null)
 {
     $view = new View('zest/padding');
     if (!$array) {
         $array = array('title' => '', 'seoUrl' => '', 'parent' => '');
     }
     $html = "";
     $html .= form::open('admin/pages/add', array('class' => 'valid_form'));
     $html .= form::input(array('title', 'Page Title'), '', 'onblur="toUrl(event,\'title\',\'seoURL\')" class="required tooltip fullWidth" title="Keep it simple, this is just for your use"');
     $html .= form::label('seoURL', 'URL Slug');
     $html .= form::input('seoURL', '', 'class="required tooltip fullWidth" title="We recommend using the same as the Page Title but instead of spaces, \' \', use the hyphen symbol, \'-\'"');
     $html .= "<hr/>";
     $html .= form::label('parent_id', 'Parent Page');
     $html .= "<select id='parent_id' name='parent_id' class='fullWidth'>\r\n\t\t\t\t\t<option value='0'>-- NONE --</option>";
     $pages = ORM::factory('page')->find_all();
     foreach ($pages as $p) {
         $title = $p->title;
         if ($p->parent_id != 0) {
             $title = ORM::factory('page', $p->parent_id)->title . " - " . $title;
         }
         $html .= "<option value='" . $p->id . "'>" . $title . "</option>";
     }
     $html .= "</select>\t";
     $html .= "<hr />";
     $html .= "<hr />";
     $html .= form::submit(null, 'Save', 'class="submit"');
     $html .= form::close();
     $view->content = $html;
     return $view;
 }
Example #15
0
 /**
  * Creates the form HTML
  *
  * @param   string   form view template name
  * @param   boolean  use a custom view
  * @return  string
  */
 public function render($template = 'forge_template', $custom = FALSE)
 {
     // Load template
     $form = new View($template);
     if ($custom) {
         // Using a custom view
         $data = array();
         foreach (array_merge($this->hidden, $this->inputs) as $input) {
             $data[$input->name] = $input;
             // Groups will never have errors, so skip them
             if ($input instanceof Form_Group) {
                 continue;
             }
             // Compile the error messages for this input
             $messages = '';
             $errors = $input->error_messages();
             if (is_array($errors) and !empty($errors)) {
                 foreach ($errors as $error) {
                     // Replace the message with the error in the html error string
                     $messages .= str_replace('{message}', $error, $this->error_format) . $this->newline_char;
                 }
             }
             $data[$input->name . '_errors'] = $messages;
         }
         $form->set($data);
     } else {
         // Using a template view
         $form->set($this->template);
         $hidden = array();
         if (!empty($this->hidden)) {
             foreach ($this->hidden as $input) {
                 $hidden[$input->name] = $input->value;
             }
         }
         $form_type = 'open';
         // See if we need a multipart form
         $check_inputs = array($this->inputs);
         while ($check_inputs) {
             foreach (array_shift($check_inputs) as $input) {
                 if ($input instanceof Form_Upload) {
                     $form_type = 'open_multipart';
                 }
                 if ($input instanceof Form_Group) {
                     $check_inputs += array($input->inputs);
                 }
             }
         }
         // Set the form open and close
         $form->open = form::$form_type(arr::remove('action', $this->attr), $this->attr, $hidden);
         $form->close = form::close();
         // Set the inputs
         $form->inputs = $this->inputs;
     }
     return $form;
 }
Example #16
0
	<tr name="syncRunningConfigRow" class="syncRunningConfigRow even" id="syncRunningConfigRow_buildrunningqueuelist"><td name="syncRunningConfigLabel" id="syncRunningConfigLabel_buildrunningqueuelist" class="sub">Building List of Running Queues</td><td name="syncRunningConfigStatus" id="syncRunningConfigstatus_buildrunningqueuelist" class="status"></td></tr>
	<tr name="syncRunningConfigRow" class="syncRunningConfigRow odd" id="syncRunningConfigRow_builddbqueuelist"><td name="syncRunningConfigLabel" id="syncRunningConfigLabel_builddbqueuelist" class="sub">Building List of Queues in the database</td><td name="syncRunningConfigStatus" id="syncRunningConfigstatus_builddbqueuelist" class="status"></td></tr>
	<tr name="syncRunningConfigRow" class="syncRunningConfigRow even" id="syncRunningConfigRow_reconcilequeues"><td name="syncRunningConfigLabel" id="syncRunningConfigLabel_reconcilequeues" class="sub">Reconciling Queues</td><td name="syncRunningConfigStatus" id="syncRunningConfigstatus_reconcilequeues" class="status"></td></tr>
	<tr name="syncRunningConfigRow" class="syncRunningConfigRow group" id="syncRunningConfigRow_agentgroup"><td name="syncRunningConfigLabel" id="syncRunningConfigLabel_agentgroup" class="group">Agents</td><td name="syncRunningConfigStatus" id="syncRunningConfigstatus_agentgroup" class="status"></td></tr>
	<tr name="syncRunningConfigRow" class="syncRunningConfigRow even" id="syncRunningConfigRow_buildrunningagentlist"><td name="syncRunningConfigLabel" id="syncRunningConfigLabel_buildrunningagentlist" class="sub">Reconciling Agents</td><td name="syncRunningConfigStatus" id="syncRunningConfigstatus_buildrunningagentlist" class="status"></td></tr>
	<tr name="syncRunningConfigRow" class="syncRunningConfigRow odd" id="syncRunningConfigRow_builddbagentlist"><td name="syncRunningConfigLabel" id="syncRunningConfigLabel_builddbagentlist" class="sub">Building List of Agents in the database</td><td name="syncRunningConfigStatus" id="syncRunningConfigstatus_builddbagentlist" class="status"></td></tr>
	<tr name="syncRunningConfigRow" class="syncRunningConfigRow even" id="syncRunningConfigRow_reconcileagents"><td name="syncRunningConfigLabel" id="syncRunningConfigLabel_reconcileagents" class="sub">Reconciling Agents</td><td name="syncRunningConfigStatus" id="syncRunningConfigstatus_reconcileagents" class="status"></td></tr>
	<tr name="syncRunningConfigRow" class="syncRunningConfigRow group" id="syncRunningConfigRow_tiergroup"><td name="syncRunningConfigLabel" id="syncRunningConfigLabel_tiergroup" class="group">Tiers</td><td name="syncRunningConfigStatus" id="syncRunningConfigstatus_tiergroup" class="status"></td></tr>
	<tr name="syncRunningConfigRow" class="syncRunningConfigRow even" id="syncRunningConfigRow_syncronizetiers"><td name="syncRunningConfigLabel" id="syncRunningConfigLabel_syncronizetiers" class="sub">Reconciling Tiers</td><td name="syncRunningConfigStatus" id="syncRunningConfigstatus_syncronizetiers" class="status"></td></tr>
</table>
<br>
<?php 
echo form::open();
$data = array('name' => 'submit[' . Bluebox_Controller::SUBMIT_CONFIRM . ']', 'class' => 'save small_green_button hide');
echo form::button($data, 'OK');
echo form::close(FALSE);
?>
<script language="javascript">


	function enableOKButton() {
		$('#submit_confirm__OK').removeClass('hide');
	}
	function clearWorking(el) {
		$(el).html("");
	}
	function setWorking(el) {
		$(el).html('<img src="<?php 
echo url::base() . skins::getSkin();
?>
assets/img/thinking.gif">');
Example #17
0
 public function roles($method, $id)
 {
     $role = ORM::factory('role', $id);
     switch ($method) {
         case 'delete':
             $role->delete();
             url::redirect('admin/users#tab_Roles_3');
             break;
         case 'edit':
             $this->__set_heading("Edit Role - " . $role->name);
             $view = new View('zest/content');
             $content = form::open('admin/users/roles/save/' . $role->id);
             $content .= form::label('name', 'Name') . form::input('name', $role->name, 'class="fullWidth"');
             $content .= "<hr/>";
             $content .= form::label('description', 'Description') . form::textarea('description', $role->description, 'class="fullWidth no-editor"');
             $content .= form::submit('submit', 'Save', "class='submit'");
             $content .= form::close();
             $view->content = $content;
             $this->__set_content($view);
             break;
         case 'save':
             unset($_POST['submit']);
             foreach ($_POST as $key => $val) {
                 $role->{$key} = $val;
             }
             $role->save();
             url::redirect('admin/users#tab_Roles_3');
             break;
     }
 }
Example #18
0
 public function __form()
 {
     $ANALYTICS_CODE = ORM::factory('setting', 'ANALYTICS_CODE');
     $EXTRA_HEAD = ORM::factory('setting', 'EXTRA_HEAD');
     $html = form::open(NULL);
     $html .= form::hidden('main', 'true');
     $html .= form::label('ANALYTICS_CODE', 'Analytics Code');
     $html .= "<p>For advanced users only</p>";
     $html .= form::textarea(array('name' => 'ANALYTICS_CODE', 'value' => $ANALYTICS_CODE->value, 'class' => 'fullWidth  no-editor'));
     $html .= form::label('EXTRA_HEAD', 'Header Extras');
     $html .= "<p>For advanced users only (Often used for Google Webmaster Tools</p>";
     $html .= form::input(array('name' => 'EXTRA_HEAD', 'value' => $EXTRA_HEAD->value, 'class' => 'fullWidth'));
     $html .= form::submit('submit', 'Save', 'class="submit"') . '<p>&nbsp;</p><p>&nbsp;</p>';
     $html .= form::close();
     return $html;
 }
Example #19
0
    <?php 
echo form::open();
?>

    <?php 
echo form::open_section('Confirm');
?>

    <div class="delete_warning">

        <?php 
echo __('Are you sure you want to delete the ' . $baseModel . ' ' . $name . '?');
?>
        
    </div>

    <?php 
echo form::close_section();
?>

    <?php 
if (isset($views)) {
    echo subview::renderAsSections($views);
}
?>

    <?php 
echo form::close(form::BUTTONS_DELETE_CANCEL);
?>

</div>
Example #20
0
 /**
  * Renders the Morf object into an HTML form
  *
  * @param boolean $print If TRUE render will automatically print the form
  * @return string HTML form representation of the Morf object
  * @author Sam Clark
  */
 public function render($print = FALSE)
 {
     // Load correct view
     $view = new View('morf/groups/form');
     $element_cache = '';
     $render_variables = array('enctype' => 'application/x-www-form-urlencoded', 'submit' => FALSE);
     // Foreach element
     foreach ($this->elements as $name => $element) {
         $element_cache .= $element->render($render_variables, $this->errors);
     }
     $this->enctype = $render_variables['enctype'];
     if (!$render_variables['submit'] and $this->config['autosubmit']) {
         $element_cache .= Morf_Element::factory('input', $this->config['autosubmit']['config'], $this->config['autosubmit']['value'])->render($render_variables, $this->errors);
     }
     // Create output buffer
     $result = form::open($this->action, $this->_format_attributes());
     // Apply the rendered elements to the view
     $view->elements = $element_cache;
     // Render the resulting view
     $result .= $view->render();
     // Close form
     $result .= form::close();
     // If print is true, print the output
     if ($print) {
         echo $result;
     }
     // Return the resulting output
     return $result;
 }
Example #21
0
" disabled="disabled" />
	<p class="help-block">User name cannot be changed</p>
	</div>
	<div class="form-group">
	<label for="realname">Full Name:</label>
	<input type="text" name="realname" class="form-control" value="<?php 
    echo get_user_realname(SESSION());
    ?>
" />
	</div>
	<div class="form-group">
	<label for="password">Password:</label>
	<input type="password" name="password" maxlength="20" class="form-control"/>
	</div>
	<div class="form-group">
	<label for="password2">Confirm Password:</label>
	<input type="password" class="form-control" maxlength="20" name="password2" />
	</div>
	<button class="btn btn-primary" type="submit" name="settings" value="apply">
	<span class="fa fa-check"></span>&nbsp;Apply</button>
	<a href="<?php 
    echo $LSP_URL;
    ?>
" class="btn btn-warning"><span class="fa fa-close"></span>&nbsp;Cancel</a>
	<?php 
    $form->close();
    echo '</div>';
}
?>

Example #22
0
 private function __form($array = false)
 {
     if (!$array) {
         $array = array("title" => "", "url" => "", "text" => "", "user_id" => "", "feed_id" => "", "feedpost_id" => "", "media_id" => "", "status_id" => "", "tags" => "", "type" => "error");
     }
     $form = "";
     $form .= form::open(null, array('class' => 'valid_form'));
     $form .= form::input(array('title', 'Title'), $array['title'], 'class="required fullWidth"');
     $form .= form::textarea(array("display" => "Text", "name" => "text"), $array['text']);
     $form .= form::hidden("user_id", $array['user_id']);
     $form .= form::hidden("feed_id", $array['feed_id']);
     $form .= form::hidden("feedpost_id", $array['feedpost_id']);
     $form .= form::hidden("type", $array['type']);
     $form .= form::label('media_id', 'Image');
     $form .= $this->zest->image_selector('media_id', $array['media_id'], FALSE, FALSE);
     $form .= form::input(array('tags', 'Tags'), $array['tags']);
     $form .= form::label('status_id', 'Status');
     $status = ORM::factory('status')->find_all();
     $arr = array();
     foreach ($status as $s) {
         $arr[$s->id] = $s->title;
     }
     $form .= form::dropdown(array("class" => "fullWidth", "name" => "status_id"), $arr, $array['status_id']);
     $form .= form::submit('submit', 'Save', 'class="submit"');
     $form .= form::close();
     return $form;
 }
 /**
  * Demontrates how to use the Captcha library.
  */
 public function captcha()
 {
     // Look at the counters for valid and invalid
     // responses in the Session Profiler.
     new Profiler();
     // Load Captcha library, you can supply the name
     // of the config group you would like to use.
     $captcha = new Captcha();
     // Ban bots (that accept session cookies) after 50 invalid responses.
     // Be careful not to ban real people though! Set the threshold high enough.
     if ($captcha->invalid_count() > 49) {
         exit('Bye! Stupid bot.');
     }
     // Form submitted
     if ($_POST) {
         // Captcha::valid() is a static method that can be used as a Validation rule also.
         if (Captcha::valid($this->input->post('captcha_response'))) {
             echo '<p style="color:green">Good answer!</p>';
         } else {
             echo '<p style="color:red">Wrong answer!</p>';
         }
         // Validate other fields here
     }
     // Show form
     echo form::open();
     echo '<p>Other form fields here...</p>';
     // Don't show Captcha anymore after the user has given enough valid
     // responses. The "enough" count is set in the captcha config.
     if (!$captcha->promoted()) {
         echo '<p>';
         echo $captcha->render();
         // Shows the Captcha challenge (image/riddle/etc)
         echo '</p>';
         echo form::input('captcha_response');
     } else {
         echo '<p>You have been promoted to human.</p>';
     }
     // Close form
     echo form::submit(array('value' => 'Check'));
     echo form::close();
 }
Example #24
0
        </div>

    <?php echo form::close_section(); ?>

    <?php echo form::open_section('Call Routing'); ?>

        <div class="field">
        <?php
            echo form::label('number[location_id]', 'Location:');
            echo locations::dropdown('number[location_id]');
        ?>
        </div>
    
        <div class="field">
            <?php
                echo form::label(array(
                        'for' => 'device[context_id]',
                        'hint' => 'Default outbound call context',
                        'help' => 'This field determines the phone numbers a user can call. All phone numbers and SIP trunks associated with the selected context can be dialed by this user.<BR><BR>Note that, in most cases, the user\'s device must authenticate in order for this to work. Note that if this is not set, the context for the default interface a call is received on is used instead.'
                    ),
                    'Default Context:'
                );
            ?>
            <?php echo numbering::selectContext('number[context_id]'); ?>
        </div>

    <?php echo form::close_section(); ?>

    <?php echo form::close(TRUE); ?>

</div>
Example #25
0
<?php

defined('SYSPATH') or die('No direct access allowed.');
?>

<div id="callmanager_header" class="modules callmanager module_header">
    <h2><?php 
echo __('Result');
?>
</h2>
</div>
<?php 
echo $commandresponse;
echo form::open();
echo form::close('ok_only');
Example #26
0
<div id="callmanager_header" class="modules callmanager module_header">
	<h2><?php 
echo __('Record Call');
?>
</h2>
</div>
<?php 
echo form::open();
echo form::hidden('uuid', $uuid);
if ($record_file) {
    echo 'This call is currently being recorded to <br><span style="font-weight: bold;">' . $record_file . '</span><br>';
    echo 'Would you like to stop it?';
    echo form::close('yes_no');
} else {
    ?>
	<div class="field">
	<?php 
    echo form::label(array('for' => 'file_tag', 'hint' => 'Recording file tag.', 'help' => 'Name of file to save audio to.  The system recording path will be prepended and the extention .wav added automaticly.<br>You can use the following variables:<ul><li>%date% - date in yyyy-mm-dd_hh:mm:ss format</li><li>%uuid% - Unique ID of call</li></ul>'), 'File Tag:');
    echo form::input('file_name', $file_name);
    ?>
	</div>
	<div class="field">
	<?php 
    echo form::label(array('for' => 'max_record_time', 'hint' => 'Maximum recording length.', 'help' => 'Maximum number of seconds to record.  Keeps the file size from getting out of hand. 0 is disabled'), 'Max Record Secs:');
    echo form::input('max_record_time', 0);
    ?>
	</div>
	<?php 
    echo form::close('ok_cancel');
}
 private function _editor($blog)
 {
     if ($blog->validate($_POST)) {
         $blog->user_id = $this->a2->get_user()->id;
         $blog->save();
         return $this->index();
     }
     //show form
     echo form::open();
     echo 'text:' . form::textarea('text', $blog->text) . '<br>';
     echo form::submit(array('value' => 'post'));
     echo form::close();
 }
Example #28
0
                                <div class="az_char_table">
                                 <?php 
    echo form::open("az_char");
    ?>
                                        <ul class="az_buttons">
                                                <li class="az_buttons"><input type="button" id="az_char_search_buttons_e" value="ə" class="az_char_buttons"></li>
                                                <li class="az_buttons"><input type="button" id="az_char_search_buttons_c" value="ç" class="az_char_buttons"></li>
                                                <li class="az_buttons"><input type="button" id="az_char_search_buttons_g" value="ğ" class="az_char_buttons"></li>
                                                <li class="az_buttons"><input type="button" id="az_char_search_buttons_i" value="ı" class="az_char_buttons"></li>
                                                <li class="az_buttons"><input type="button" id="az_char_search_buttons_o" value="ö" class="az_char_buttons"></li>
                                                <li class="az_buttons"><input type="button" id="az_char_search_buttons_u" value="ü" class="az_char_buttons"></li>
                                                <li class="az_buttons"><input type="button" id="az_char_search_buttons_s" value="ş" class="az_char_buttons"></li>
                                                <li class="az_buttons"><input type="button" id="az_char_search_buttons_w" value="w" class="az_char_buttons"></li>
                                        </ul>
                                <?php 
    form::close();
    ?>
                                </div>
                        </div>
                                <!-- / azerbaijani characters -->
					
					</div>
				<?php 
}
?>

			</div>
		</div>
		<!-- / content column -->

	</div>
Example #29
0
echo Form::input('invoice', $post['invoice']);
?>
 using:</p>

		<ul class="gateway">
			<li><label><?php 
echo Form::radio('gateway', 'paypal', $post['gateway'] === 'paypal');
?>
 <?php 
echo HTML::image('https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif', array('alt' => 'PayPal'));
?>
</label></li>
			<li><label><?php 
echo Form::radio('gateway', 'gcheckout', $post['gateway'] === 'gcheckout');
?>
 <?php 
echo HTML::image('https://checkout.google.com/buttons/checkout.gif?merchant_id=760570731838371&w=168&h=44&style=white&variant=text&loc=en_US', array('alt' => 'Google Checkout'));
?>
</label></li>
		</ul>

		<p><?php 
echo Form::button(NULL, 'Send Payment');
?>
</p>

	<?php 
echo form::close();
?>

</div>
Example #30
0
		</ul>
	</div>
<?php 
}
?>
<div class="form-row">
	<?php 
echo form::label('username');
?>
	<?php 
echo form::input('username', Arr::get($post, 'user', ''), array('id' => 'username'));
?>
</div>

<div class="form-row">
	<?php 
echo form::label('password');
?>
	<?php 
echo form::password('password', Arr::get($post, 'password', ''), array('id' => 'password'));
?>
</div>
<?php 
echo form::submit('submit', 'Log In');
echo form::close('');
?>

</div>

<?php 
echo View::factory('template/footer');