Ejemplo n.º 1
0
 public function view()
 {
     $manager = new Pass_File_Manager($this->pass);
     $pass = $this->pass;
     $this->echo_img = function ($name) use($manager, $pass) {
         if (file_exists($manager->file_path($name))) {
             echo \Fuel\Core\Html::img(\Fuel\Core\Uri::create('admin/pass/image/' . $pass->id . '/' . $name), array('alt' => str_replace('.png', '', $name)));
         }
     };
     $image_names = array('icon.png', '*****@*****.**', 'logo.png', '*****@*****.**', 'background.png', '*****@*****.**', 'footer.png', '*****@*****.**', 'strip.png', '*****@*****.**', 'thumbnail.png', '*****@*****.**');
     $this->images = array_map(function ($image_name) use($manager) {
         if (file_exists($manager->file_path($image_name))) {
             return array('name' => $image_name, 'sizes' => \Fuel\Core\Image::sizes($manager->file_path($image_name)));
         } else {
             return null;
         }
     }, array_filter($image_names, function ($image_name) use($manager) {
         if (file_exists($manager->file_path($image_name))) {
             return true;
         } else {
             return false;
         }
     }));
     $this->upload_image_selection = $manager->required_images_readable();
 }
Ejemplo n.º 2
0
    ?>
</td>
        <td><?php 
    echo \Fuel\Core\Form::input('label', '', array('class' => 'span3'));
    ?>
</td>
        <td><?php 
    echo \Fuel\Core\Form::input('value', '', array('class' => 'span3'));
    ?>
</td>
        <td><?php 
    echo \Fuel\Core\Form::input('others', '', array('class' => 'span3', 'placeholder' => 'name1:content1 name2:content2 ...'));
    ?>
</td>
        <td><?php 
    echo \Fuel\Core\Form::submit('submit', 'Save', array('class' => 'btn btn-primary'));
    ?>
</td>
        <?php 
    echo \Fuel\Core\Form::close();
    ?>
    </tr>
    </tbody>
</table>

<p><?php 
    echo \Fuel\Core\Html::anchor('admin/pass/view/' . $pass->id, 'Back');
    ?>
</p>
<?php 
}
Ejemplo n.º 3
0
        <td><?php 
        echo $pass->name;
        ?>
</td>
        <?php 
        $manager = new Pass_File_Manager($pass);
        ?>
        <td><?php 
        echo $manager->pkpass_url();
        ?>
</td>
    <td><?php 
        if (file_exists($manager->pkpass_path())) {
            ?>
        <?php 
            echo \Fuel\Core\Html::anchor(\Fuel\Core\Uri::create('admin/pass/pkpass/' . $pass->id), $pass->status());
            ?>
</td>
            <?php 
        } else {
            ?>
        <?php 
            echo $pass->status();
            ?>
        <?php 
        }
        ?>
        <td>
            <?php 
        if (empty($pass->file_name)) {
            ?>
Ejemplo n.º 4
0
				<div class="form-group">
					<?php 
echo Form::label('Name', 'name', array('class' => 'control-label'));
?>

					<?php 
echo Form::input('name', Input::post('name', isset($client) ? $client->name : ''), array('class' => 'col-md-4 form-control', 'placeholder' => 'Name'));
?>

				</div>
				<div class="form-group">
                    <div class="btn-group" role="group" aria-label="...">
                        <?php 
echo \Fuel\Core\Html::anchor("admin/clients", "&laquo; Clients", ['class' => 'btn btn-default', 'type' => 'button']);
?>
                        <?php 
echo isset($client) ? \Fuel\Core\Html::anchor("admin/clients/view/{$client->id}", 'Client Info', ['type' => 'button', 'class' => 'btn btn-info']) : '';
?>
                        <?php 
echo Form::submit('submit', 'Save', array('class' => 'btn btn-success'));
?>
                    </div>
                </div>
			</fieldset>
			<?php 
echo Form::close();
?>
		</div>
	</div>
</div>
Ejemplo n.º 5
0
    foreach ($task->project_task_logs as $log) {
        ?>
                        <li>
                            <?php 
        echo '[ ' . date('H:i A, d M Y', strtotime($log->task_started)) . ' ] ' . $log->comment . ' [ ' . number_format(round($log->get_hours_spent_by_type($log->task_is_billable()), 2), 2) . ' hrs ]';
        ?>
				<?php 
        echo $log->task_is_billable() ? '<span class="label label-warning"> Billable </span>' : '<span class="label label-danger"> Non Billable </span>';
        ?>
 &nbsp; 
                            <span class="pull-right"> 
                                <?php 
        if ($task->is_open()) {
            ?>
                                <?php 
            echo \Fuel\Core\Html::anchor('user/timesheets/deletetimes/' . $log->id, '<span class="icon-trash"></span>', array('onclick' => 'return confirm("Are you sure you want to delete this item?")', 'title' => 'Delete'));
            ?>
                                <?php 
        }
        ?>
                            </span>
                        </li>
                    <?php 
    }
    ?>
                    </ul>
                </td>
            </tr>
            <?php 
}
?>
Ejemplo n.º 6
0
 /**
  * Add "button" mekthod to html class.
  * It follow Html::anchor() arguments.
  * 
  * @access public
  * @static
  * @param mixed $href
  * @param mixed $text. (default: null)
  * @param array $attr. (default: array())
  * @param mixed $secure. (default: null)
  * @return void
  */
 public static function button($href, $text = null, $attrs = array(), $secure = false)
 {
     static::$helper->set_button_attrs($text, $attrs)->clean_attrs('button', $attrs);
     return parent::anchor($href, $text, $attrs, $secure);
 }
Ejemplo n.º 7
0
                    <tr>
                        <td>
                            <?php 
        echo ++$row_counter . ". " . $client->name;
        ?>
                            <span class="pull-right">
                                    <?php 
        echo \Fuel\Core\Html::anchor("admin/clients/view/{$client->id}", '<span class="glyphicon glyphicon-folder-close"></span>', ['title' => 'Client Details']);
        ?>
 |
                                <?php 
        echo \Fuel\Core\Html::anchor("admin/clients/edit/{$client->id}", '<span class="glyphicon glyphicon-pencil"></span>', ['title' => 'Edit']);
        ?>
 |
                                <?php 
        echo \Fuel\Core\Html::anchor("admin/clients/edit/{$client->id}", '<span class="glyphicon glyphicon-trash"></span>', ['title' => 'Delete', 'onclick' => "return confirm('Are you sure you want to delete {$client->name}?');"]);
        ?>
                                </span>
                        </td>
                    </tr>
                <?php 
    }
    ?>
                </tbody>
            </table>
		<?php 
} else {
    ?>
			<p>There are no clients yet.</p>
		<?php 
}
Ejemplo n.º 8
0
        ?>
                                        <tr>
                                            <td><?php 
        echo ++$row_counter . '. ' . \Fuel\Core\Html::anchor(isset($admin) && $admin ? 'admin/projects/view/' . $task->project_id : 'user/timesheets/logtimes/' . strtotime(date('Y-m-d')) . '?id=' . $task->id, trim($task->project->name) . ' [ ' . trim(strtoupper($task->project->customer->name)) . ' ] ');
        ?>
</td>
                                            <td><?php 
        echo \Fuel\Core\Html::anchor(isset($admin) && $admin ? 'admin/projects/view/' . $task->project_id : 'user/timesheets/logtimes/' . strtotime(date('Y-m-d')) . '?id=' . $task->id, trim($task->project_task_description));
        ?>
</td>
                                            <td><?php 
        echo \Fuel\Core\Html::anchor(isset($admin) && $admin ? 'admin/projects/view/' . $task->project_id : 'user/timesheets/logtimes/' . strtotime(date('Y-m-d')) . '?id=' . $task->id, trim($task->priority) . ' / 10');
        ?>
</td>
                                            <td><?php 
        echo \Fuel\Core\Html::anchor(isset($admin) && $admin ? 'admin/projects/view/' . $task->project_id : 'user/timesheets/logtimes/' . strtotime(date('Y-m-d')) . '?id=' . $task->id, number_format(round($task->get_hours_spent(), 2), 2));
        ?>
</td>
                                        </tr>
                                        <?php 
    }
    ?>
                                        <?php 
} else {
    ?>
                                        <tr>
                                            <td colspan="4">You have no open tasks.</td>
                                        </tr>
                                        <?php 
}
?>
Ejemplo n.º 9
0
                        <?php 
if ($val->error('email')) {
    ?>
                            <div class="controls">
                                <span class="control-label"><?php 
    echo $val->error('email')->get_message('You must provide a username or email');
    ?>
</span>
                            </div>
                        <?php 
}
?>
                </div>

                <div class="actions">
                        <?php 
echo Form::submit(array('value' => 'Reset Password', 'name' => 'submit', 'class' => 'btn btn-lg btn-primary btn-block'));
?>
 &nbsp; 
                    <?php 
echo \Fuel\Core\Html::anchor('user/login', 'Login page');
?>
                </div>

                <p>&nbsp;</p>

        <?php 
echo Form::close();
?>
    </div>    
</div>
Ejemplo n.º 10
0
<h1>404</h1>

<p>Sorry, but this page does not exist.</p>

<p><?php 
echo \Fuel\Core\Html::anchor('', 'Home Page');
?>
</p>
Ejemplo n.º 11
0
?>
        </ol>
    </div>

    <div class="col-md-3">
        <h3>System Users</h3>

        <p><?php 
echo \Fuel\Core\Html::anchor('admin/users/create', 'New System User', array('class' => 'btn btn-success btn-xs'));
?>
</p>

        <ol>
            <?php 
foreach (\Auth\Model\Auth_User::find('all', array('where' => array(array('id', '>', 0)))) as $user) {
    ?>
                <li>
                    <?php 
    echo \Fuel\Core\Html::anchor("admin/users/edit/{$user->id}", $user->fullname);
    ?>
                    <?php 
    echo \Auth\Auth::get('id') == $user->id ? '<span class="glyphicon glyphicon-user"></span>' : '';
    ?>
                </li>
            <?php 
}
?>
        </ol>
    </div>
</div>
Ejemplo n.º 12
0
<?php

use Fuel\Core\Html;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=MS932">
<title>
<?php 
echo $title;
?>
</title>
</head>

<body>
	<h1>問い合わせ</h1>
	<div id="wrapper">
		<?php 
echo $content;
?>
		<hr>
		<p class="footer">
			Powered by <?php 
echo Html::anchor('http://fuelphp.com/', 'FuelPHP');
?>
		</p>
	</div>
</body>
</html>
Ejemplo n.º 13
0
                                <td><strong><?php 
    echo number_format(round($total_hours, 2), 2) . ' HRS';
    ?>
</strong></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <?php 
} else {
    ?>
                <p>
                    There are no tasks logged for this day.
                </p>
                <?php 
}
?>
            </div>
            
            <br>
            
            <div class="container" align="center">
                <?php 
echo \Fuel\Core\Html::anchor('user/timesheets/index/' . strtotime($date), ' &laquo; Back ', array('class' => 'btn btn-default'));
?>
 
            </div>
        </div>
    </div>
</div>
Ejemplo n.º 14
0
                        <label>
                            <input type="checkbox" name="auto_close" value="1" <?php 
echo \Fuel\Core\Input::post('auto_close', isset($project) ? $project->auto_close : 1) == 1 ? ' checked ' : '';
?>
 /> Close this project automatically when the deadline is reached.
                        </label>
                    </div>

                </div>
                <div class="form-group">
                    <div class="btn-group" role="group" aria-label="...">
                        <?php 
echo \Fuel\Core\Html::anchor("admin/projects", "&laquo; Projects", ['class' => 'btn btn-default', 'type' => 'button']);
?>
                        <?php 
echo isset($project) ? \Fuel\Core\Html::anchor("admin/projects/view/{$project->id}", 'Project Info', ['type' => 'button', 'class' => 'btn btn-info']) : '';
?>
                        <?php 
echo Form::submit('submit', 'Save', array('class' => 'btn btn-success'));
?>
                    </div>
                </div>
            </fieldset>
            <?php 
echo Form::close();
?>
        </div>
        <div class="col-md-6">

        </div>
    </div>
Ejemplo n.º 15
0
</td>
                                            <td><?php 
        echo \Fuel\Core\Html::anchor(isset($admin) && $admin ? 'admin/projects/view/' . $task->project_id : 'user/timesheets/logtimes/' . strtotime(date('Y-m-d')) . '?id=' . $task->id, trim($task->priority) . ' / 10');
        ?>
</td>
                                            <td><?php 
        echo \Fuel\Core\Html::anchor(isset($admin) && $admin ? 'admin/projects/view/' . $task->project_id : 'user/timesheets/logtimes/' . strtotime(date('Y-m-d')) . '?id=' . $task->id, number_format(round($task->get_hours_spent_between($datestart_timestamp, $dateend_timestamp), 2), 2));
        ?>
</td>
                                            <td>
                                                <?php 
        $url_text = 'Log Times';
        if (isset($admin) && $admin) {
            $url_text = $task->is_open() ? 'Close Task' : 'Reopen Task';
        }
        echo \Fuel\Core\Html::anchor(isset($admin) && $admin ? 'admin/projects/viewtask/' . $task->id : 'user/timesheets/logtimes/' . strtotime(date('Y-m-d')) . '?id=' . $task->id, $url_text);
        ?>
                                            </td>
                                        </tr>
                                        <?php 
    }
    ?>
                                        <?php 
} else {
    ?>
                                        <tr>
                                            <td colspan="6">There are no open tasks found.</td>
                                        </tr>
                                        <?php 
}
?>
                        </table>   
                    </div>
                </div>

                <br>

                <div class="container" align="center">
                    <?php 
echo \Fuel\Core\Html::anchor('user/', ' &laquo; Dashboard', array('class' => 'btn btn-default'));
?>
                    <?php 
echo \Fuel\Core\Html::anchor('user/timesheets/index/' . $timestamp, ' &laquo; Timesheets &raquo;', array('class' => 'btn btn-primary'));
?>
 
                    <?php 
echo \Fuel\Core\Html::anchor('user/tasks', ' &laquo; Open Tasks &raquo;', array('class' => 'btn btn-warning'));
?>
                    <input type="submit" class="btn btn-success" name="submit" value=" Save " />
                </div>
            <?php 
echo Fuel\Core\Form::close();
?>
        </div>
    </div>
</div>

<script type="text/javascript">
    $(document).ready(function() {
        $('select').change(function() {
                var task_id = $(this).val();
                var element_id = $(this).attr('id');
Ejemplo n.º 17
0
<?php

echo \Fuel\Core\Form::open(array('class' => 'form-inline', 'method' => 'get'));
?>

<div class="form-group">
    <input id="auto-complete" class="form-control" name="search" value="<?php 
echo \Fuel\Core\Input::param('search', '');
?>
" placeholder="Project Name" />
</div>

<div class="btn-group" role="group" aria-label="...">
    <?php 
echo \Fuel\Core\Html::anchor(\Fuel\Core\Uri::current(), "Cancel", ['class' => 'btn btn-default', 'type' => 'button']);
?>
    <?php 
echo Form::submit('', 'Search', array('class' => 'btn btn-success'));
?>
</div>

<?php 
echo \Fuel\Core\Form::close();
?>

Ejemplo n.º 18
0
echo Form::open(array("class" => "form-horizontal"));
?>

	<fieldset>
		<div class="form-group">
			<?php 
echo Form::label('Name', 'name', array('class' => 'control-label'));
?>

				<?php 
echo Form::input('name', Input::post('name', isset($inventory_unit) ? $inventory_unit->name : ''), array('class' => 'col-md-4 form-control', 'placeholder' => 'Name'));
?>

		</div>
		<div class="form-group">
			<label class='control-label'>&nbsp;</label>
                        <?php 
echo \Fuel\Core\Html::anchor('admin/inventory/units', '&laquo; Inventory Units', array('class' => 'btn btn-default'));
?>
                        <?php 
echo isset($inventory_unit) ? \Fuel\Core\Html::anchor('admin/inventory/units/view/' . $inventory_unit->id, 'View', array('class' => 'btn btn-warning')) : '';
?>
			<?php 
echo Form::submit('submit', 'Save', array('class' => 'btn btn-success'));
?>
		
                </div>
	</fieldset>
<?php 
echo Form::close();
Ejemplo n.º 19
0
    echo Input::post('group', isset($user_type) ? $user_type->group : '') == $key ? ' selected ' : '';
    ?>
><?php 
    echo $name;
    ?>
</option>
                        <?php 
}
?>
                    </select>
                </div>
            
		<div class="form-group">
			<label class='control-label'>&nbsp;</label>
                        <?php 
echo \Fuel\Core\Html::anchor('admin/user/types', '&laquo; User Types', array('class' => 'btn btn-default'));
?>
                        <?php 
echo isset($user_type) ? \Fuel\Core\Html::anchor('admin/user/types/view/' . $user_type->id, 'View', array('class' => 'btn btn-warning')) : '';
?>
			<?php 
echo Form::submit('submit', 'Save', array('class' => 'btn btn-success'));
?>
                        
                </div>
	</fieldset>
<?php 
echo Form::close();
?>

<br>
Ejemplo n.º 20
0
                                    <?php 
        }
        ?>
                                <?php 
    }
    ?>
                                        
                                    <tr>
                                        <td align="center">
                                            <span class="pull-left"><strong>TOTAL TIME</strong></span>
                                        </td>
                                        <?php 
    foreach ($total_hours['days'] as $dd => $hh) {
        ?>
                                        <td><strong><?php 
        echo \Fuel\Core\Html::anchor('user/timesheets/summary/' . strtotime($dd), number_format($hh, 2) . ' HRS', array('title' => 'View Summary for ' . date('D d M Y', strtotime($dd))));
        ?>
</strong></td>
                                        <?php 
    }
    ?>
                                        <td> <strong><?php 
    echo number_format(round(array_sum($total_hours['all']), 2), 2) . ' HRS';
    ?>
</strong> </td>
                                    </tr>
                            </tbody>
                        </table>
                    <?php 
} else {
    ?>
Ejemplo n.º 21
0
<ul class="nav nav-pills">
	<li class='<?php 
echo Arr::get($subnav, "edit");
?>
'><?php 
echo Html::anchor('comments/edit', 'Edit');
?>
</li>
	<li class='<?php 
echo Arr::get($subnav, "create");
?>
'><?php 
echo Html::anchor('comments/create', 'Create');
?>
</li>

</ul>
<p>Edit</p>

<?php 
echo $form;
?>

<p><?php 
echo \Fuel\Core\Html::anchor('messages/view/' . $message, 'Back');
?>
</p>
Ejemplo n.º 22
0
                            <input type="submit" class="btn btn-primary" value="Submit" />
                            <button type="button" name="cancel" class="btn btn-default" id="cancel">Cancel</button>
                        </div>
                    </div>
                </form>
            </div>
            <hr />
            <table class="table">
                <?php 
foreach ($all_folder as $k => $v) {
    if (!is_int($k)) {
        ?>
                    <tr>
                        <td>
                            <?php 
        echo \Fuel\Core\Html::anchor(\Fuel\Core\Uri::string() . '/folder/' . $k, $k);
        ?>
                        </td>
                    </tr>
                <?php 
    }
}
?>
            </table>
        </div>
    </div>
</div>
<script src="https://buffohero.com/cms/public/assets/lib/jquery/jquery-2.0.3.min.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
        $('#dir_form').click(function(){
Ejemplo n.º 23
0
        <div id="wall">
            <?php 
try {
    foreach ($all as $k => $v) {
        if (is_int($k)) {
            $name = '';
            $model = Model_Filemanager::find_by_value($v);
            if ($model and $model->deleted_at == null) {
                $name = $model->key;
                $v = str_replace('150x150_', '', $v);
                echo '<div class=" col-lg-2"><div class="thumbnail">';
                echo \Fuel\Core\Html::img('images/file/' . $folder . '/270x270/crop/?image=' . $v);
                echo '<div class="caption">';
                echo '<p class="img_name">' . $name . '</p>';
                echo '<p>' . \Fuel\Core\Html::anchor('images/file/' . $folder . '/150x150/crop/?image=' . $v . '&action=view', '<i class="fa fa-eye-open"></i> ดูข้อมูล', array('class' => 'btn btn-info view')) . '</p>';
                echo '<p>' . \Fuel\Core\Html::anchor('images/file/' . $folder . '/150x150/crop/?image=' . $v . '&action=delete', '<i class="fa fa-times"></i> ลบ', array('class' => 'btn btn-danger')) . '</p>';
                echo '</div>';
                echo '</div></div> ';
            }
        }
    }
} catch (Exception $e) {
    echo $e->getMessage();
}
?>

            <div class="clearfix"></div>
        </div>
    </div>
</div>
Ejemplo n.º 24
0
				<?php 
if ($val->error('password')) {
    ?>
					<span class="control-label"><?php 
    echo $val->error('password')->get_message(':label cannot be blank');
    ?>
</span>
				<?php 
}
?>
			</div>

			<div class="actions">
				<?php 
echo Form::submit(array('value' => 'Login', 'name' => 'submit', 'class' => 'btn btn-lg btn-primary btn-block'));
?>
 &nbsp; 
                                <?php 
echo \Fuel\Core\Html::anchor('user/forgot', 'Forgot password?');
?>
			</div>
                        
                        <p>&nbsp;</p>

		<?php 
echo Form::close();
?>
	</div>
</div>
Ejemplo n.º 25
0
        
        <input type="text" class="form-control input-sm" name="task_completed" id="datepicker-2" placeholder="" value="<?php 
echo $task_log->task_completed == '' ? date('Y-m-d') : date('Y-m-d', strtotime($task_log->task_completed));
?>
" required />
        
        <label class="input-group-addon btn input-sm" for="datepicker-2">
            <span class="glyphicon glyphicon-calendar"></span>
        </label>
    </div>
</div>

<div class="form-group">
    <label for="comments" class="control-label input-sm">Notes:</label>
    <textarea class="form-control input-sm" name="comment" id="comment" required="" rows="3"><?php 
echo trim($task_log->comment);
?>
</textarea>
</div>

<div class="form-group">
    <?php 
echo \Fuel\Core\Html::anchor('user/timesheets/view/' . $task->id, 'Back', array('class' => 'btn btn-default'));
?>
    <?php 
echo Fuel\Core\Form::submit('submit', 'Submit', array('class' => 'btn btn-success'));
?>
</div>

<?php 
echo Fuel\Core\Form::close();