public function executeNew(sfWebRequest $request)
 {
     $this->event = new Event();
     //set Default Data
     $this->event->setParentClass($request->getParameter("parent_class"));
     $this->event->setParentId($request->getParameter("parent_id"));
     $parent = $this->event->getParent();
     //validate parent is not cancelled, do nothing
     if ($parent->isCancelled()) {
         $this->redirect("home/error?msg='Cannot create event. This transaction has been cancelled.'");
     }
     //validate parent is not fully paid
     if ($this->event->getParentClass() == "Invoice") {
         $invoice = $this->event->getParent();
         if ($invoice->getStatus() == "Paid") {
             //new invno not unique: error msg and quit
             $message = "Invoice is fully paid";
             $this->getUser()->setFlash('error', $message);
             return $this->redirect($request->getReferer());
         }
     }
     $this->event->setParentName($parent->getName());
     $this->event->setType($request->getParameter("type"));
     $this->event->setDate(MyDate::today());
     if ($request->getParameter("type") == "stockin" or $request->getParameter("type") == "stockout" or $request->getParameter("type") == "stocktrans") {
         EventTable::generate($this->event);
         $this->redirect($request->getReferer());
     }
     $this->form = $this->configuration->getForm($this->event);
 }
Beispiel #2
0
 public function __construct()
 {
     $this->__creationDate = new DateTime();
     $this->__creationDate->add(new DateInterval('P' . self::$__inter . 'D'));
     if (self::$__inter > 3) {
         self::$__inter = 0;
     } else {
         self::$__inter += 1;
     }
 }
Beispiel #3
0
 function after()
 {
     $new_notice = '';
     if (isset($this->template->notice_count['new']) and $this->template->notice_count['new'] > 0) {
         $new_notice = ' <span style="background-color: #d8a04b; color: #FFF; text-decoration: none; padding: 0 5px;">' . $this->template->notice_count['new'] . '</span>';
     }
     $menu = array('main' => array('url' => 'cabinet', 'title' => 'Панель управления', 'icon' => 'assets/img/icons/home.png'), 'profile' => array('url' => 'cabinet/profile', 'title' => __('cb_profile'), 'icon' => 'assets/img/icons/profile_mini.png'), 'company' => array('url' => 'cabinet/company', 'title' => __('cb_companies'), 'icon' => 'assets/img/icons/services_mini.png'), 'statistics' => array('url' => 'cabinet/statistics', 'title' => 'Статистика', 'icon' => 'assets/img/icons/statistics.png'), 'gallery' => array('url' => 'cabinet/gallery', 'title' => 'Галерея', 'icon' => 'assets/img/icons/gallery.png'), 'news' => array('url' => 'cabinet/news', 'title' => __('cb_news'), 'icon' => 'assets/img/icons/news_mini.png'), 'vacancy' => array('url' => 'cabinet/vacancy', 'title' => __('cb_vacancies'), 'icon' => 'assets/img/icons/vacancies_mini.png'), 'stock' => array('url' => 'cabinet/stock', 'title' => __('cb_stocks'), 'icon' => 'assets/img/icons/stocks_mini.png'), 'qa' => array('url' => 'cabinet/qa', 'title' => __('cb_questions'), 'icon' => 'assets/img/icons/questions.png'), 'adv' => array('url' => 'cabinet/adv', 'title' => __('cb_adv'), 'icon' => 'assets/img/icons/adv_mini.png'), 'feedback' => array('url' => 'cabinet/feedback', 'title' => __('cb_feedback'), 'icon' => 'assets/img/icons/feedback.png'), 'notice' => array('url' => 'cabinet/notice', 'title' => __('cb_notice') . $new_notice, 'icon' => 'assets/img/icons/notices_mini.png'), 'payment' => array('url' => 'cabinet/payment/', 'title' => __('cb_payment'), 'icon' => 'assets/img/icons/ccard.png'));
     $cabinet_template = View::factory('templates/cabinet')->set('menu_items', $menu)->set('content', $this->template->content)->set('notice_count', $this->template->notice_count)->set('expires', empty($this->user->expires) ? null : MyDate::show_small($this->user->expires))->render();
     $this->template->content = $cabinet_template;
     parent::after();
 }
    public function testQueryDateFormatter()
    {
        $dateFromDateTime = OpenExchangeRates::getFormattedQueryDate(DateTime::createFromFormat('Y-m-d', '2015-12-31'));
        $this->assertEquals('2015-12-31', $dateFromDateTime);
        $dateFromTimestamp = OpenExchangeRates::getFormattedQueryDate($time = time());
        $this->assertEquals(date('Y-m-d', $time), $dateFromTimestamp);
        $dateFromString = OpenExchangeRates::getFormattedQueryDate('2015-05-10');
        $this->assertEquals('2015-05-10', $dateFromString);
        if (!interface_exists('DateTimeInterface')) {
            eval('
                interface DateTimeInterface {
                    public function format($format);
                }

                class MyDate extends DateTime implements DateTimeInterface {}
            ');
            $dateTimeImplementation = new MyDate();
            $dateTimeImplementation->setTimestamp($mytime = time());
            $this->assertEquals(date('Y-m-d', $mytime), OpenExchangeRates::getFormattedQueryDate($dateTimeImplementation));
        }
    }
 public static function get_number_of_day($month, $year)
 {
     $end_day = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
     $day = $end_day[$month - 1];
     //index array dari 0 jd hrs -1
     if ($month == 2) {
         if (MyDate::is_leap_year($year)) {
             //cek taun kabisat
             $day = 29;
         }
     }
     return $day;
 }
 public function createDesignation()
 {
     $in = Input::all();
     $rules = ['group' => 'required', 'deadline' => 'required', 'time' => 'required'];
     $validation = Validator::make($in, $rules);
     if ($validation->passes()) {
         $activity = GroupPageActivity::find($in['grouppageactivityID']);
         $gpaGroup = GroupPageActivityGroup::create(['grouppageactivityID' => $in['grouppageactivityID'], 'grouppageID' => $in['group'], 'deadline' => $in['deadline'] . ' ' . $in['time']]);
         if ($gpaGroup) {
             $gpPost = GroupPagePost::create(['grouppageID' => $in['group'], 'StudentID' => Auth::user()->StudentID, 'Message' => '<h5>Activity name:</h5>' . $activity->name . '<br/><h5>Description:</h5>' . $activity->description . '<br/><span class="timeago">Deadline: ' . date(MyDate::getDateFormat(), strtotime($in['deadline'])) . '</span><p>Kindly check your activities Tab</p>']);
             Notification::create(['StudentID' => Auth::user()->StudentID, 'grouppageID' => $in['group'], 'grouppageactivityID' => $in['grouppageactivityID'], 'grouppagepostID' => $gpPost->id, 'notificationEventTypeID' => 1, 'seen' => 0]);
         }
         return Redirect::to('/')->with('message', 'Group activity designation successful')->with('url', '/group/activities/view/' . $in['grouppageactivityID']);
     }
     return Redirect::to('/')->with('message', 'Error in group activity designation')->with('url', '/group/activities/view/' . $in['grouppageactivityID']);
 }
Beispiel #7
0
 /**
  * Просмотр отзыва
  * @throws HTTP_Exception_404
  * @return void
  */
 public function action_view()
 {
     $service = ORM::factory('service', $this->request->param('service_id'));
     if (!$service->loaded()) {
         throw new HTTP_Exception_404('Такая компания не найдена');
     }
     $review = $service->reviews->get_review($this->request->param('review_id'));
     if (!$review->loaded()) {
         throw new HTTP_Exception_404('Такой отзыв для компании ' . $service->name . ' не найден');
     }
     $this->template->title = 'Отзыв к автосервису ' . $service->name . ' от ' . MyDate::show($review->date);
     $this->template->bc['services/' . $service->id] = $service->get_name(2);
     $this->template->bc['services/' . $service->id . '/reviews'] = 'Отзывы';
     $this->template->bc['#'] = 'Отзыв от ' . MyDate::show($review->date);
     $this->view = View::factory('frontend/review/view')->set('review', $review);
     $this->template->content = $this->view;
 }
 public function downloadTable($id, $year, $month)
 {
     $contents = "DATA ABSENSI BINA BAKTI\n\n";
     $department = Department::find($id);
     $contents .= "Unit: ," . $department->name . "\n";
     $months = MyDate::get_month_names();
     $contents .= "Bulan: ," . $months[$month - 1] . "\n";
     $contents .= "Tahun: ," . $year . "\n\n";
     $contents .= "KODE,NAMA,NORMAL,,PULANG AWAL,,,TERLAMBAT,LUPA,TUGAS LUAR,,OTHER,TIDAK MASUK,,,JUMLAH HARI MASUK,,JUMLAH HARI TIDAK MASUK,NOMINAL UANG KONSUMSI\n";
     $contents .= ",,WEEKDAY,WEEKEND,WEEKDAY < 12,WEEKDAY >= 12,WEEKEND,,,WEEKDAY,WEEKEND,,SAKIT,IZIN,ALPHA,WEEKDAY,WEEKEND,,WEEKDAY,WEEKEND,PULANG AWAL,TOTAL\n";
     $employees = Employee::where('department_id', '=', $id)->orderBy('name')->get();
     $total = 0;
     foreach ($employees as $employee) {
         $contents .= $employee->ssn . ",";
         $contents .= $employee->name . ",";
         $data = Session::pull($employee->id, 'default');
         $total += $data['konsumsi_total'];
         $contents .= $data['normal_weekday'] . ",";
         $contents .= $data['normal_weekend'] . ",";
         $contents .= $data['pulang_awal_weekday_before_12'] . ",";
         $contents .= $data['pulang_awal_weekday'] . ",";
         $contents .= $data['pulang_awal_weekend'] . ",";
         $contents .= $data['terlambat'] . ",";
         $contents .= $data['lupa'] . ",";
         $contents .= $data['tugas_luar_weekday'] . ",";
         $contents .= $data['tugas_luar_weekend'] . ",";
         $contents .= $data['other'] . ",";
         $contents .= $data['sakit'] . ",";
         $contents .= $data['izin'] . ",";
         $contents .= $data['alpha'] . ",";
         $contents .= $data['masuk_weekday'] . ",";
         $contents .= $data['masuk_weekend'] . ",";
         $contents .= $data['tidak_masuk'] . ",";
         $contents .= $data['konsumsi_weekday'] . ",";
         $contents .= $data['konsumsi_weekend'] . ",";
         $contents .= $data['konsumsi_pulang_awal'] . ",";
         $contents .= $data['konsumsi_total'] . ",";
         $contents .= "\n";
     }
     $contents .= ",,,,,,,,,,,,,,,,,,,,," . $total;
     //        $file_name = "allowance.csv";
     $file = public_path() . "/download/allowance.csv";
     File::put($file, $contents);
     return Response::download($file, "allowance-" . strtolower($department->name) . "-" . $month . "-" . $year . ".csv", array('Content-Type' => 'text/csv', 'Content-Disposition' => 'attachment;'));
 }
Beispiel #9
0
 /**
  * Просмотр новости компании
  * @throws HTTP_Exception_404
  */
 public function action_view()
 {
     $service = ORM::factory('service', $this->request->param('service_id'));
     if (!$service->loaded()) {
         throw new HTTP_Exception_404('Такая компания не найдена');
     }
     $news = $service->news->where('id', '=', $this->request->param('news_id'))->find();
     if (!$news->loaded()) {
         throw new HTTP_Exception_404('Новость для компании ' . $service->name . ' не найдена');
     }
     $this->template->title = $news->title;
     $this->view = View::factory('frontend/news/services/view')->set('news', $news);
     $this->template->bc['services/' . $service->id] = $service->get_name(2);
     $this->template->bc['services/' . $service->id . '/news'] = 'Новости';
     $this->template->bc['#'] = 'Новость от ' . MyDate::show($news->date_create);
     //$this->template->bc['#'] = $this->template->title;
     $this->template->content = $this->view;
 }
Beispiel #10
0
 /**
  * Просмотр акции автосервиса
  * @throws HTTP_Exception_404
  * @return void
  */
 public function action_view()
 {
     $service = ORM::factory('service', $this->request->param('service_id'));
     if (!$service->loaded()) {
         throw new HTTP_Exception_404('Такая компания не найдена');
     }
     $stock = $service->stocks->get_stock($this->request->param('stock_id'));
     if (!$stock->loaded()) {
         throw new HTTP_Exception_404('Такая акция от компании ' . $service->name . ' не найдена');
     }
     $this->template->title = 'Акция автосервиса ' . $service->name;
     if (trim($stock->title)) {
         $this->template->title .= ' ' . $stock->title;
     }
     $this->template->title .= ' от ' . MyDate::show($stock->date);
     $this->template->bc['services/' . $service->id] = $service->get_name(2);
     $this->template->bc['services/' . $service->id . '/stocks'] = 'Акции';
     $this->template->bc['#'] = 'Акция ' . $stock->title . ' от ' . MyDate::show($stock->date);
     $this->view = View::factory('frontend/stock/view')->set('stock', $stock);
     $this->template->content = $this->view;
 }
 public function doLogin()
 {
     $in = Input::all();
     $user = array('AccountID' => $in['AccountID'], 'password' => $in['password']);
     $rules = array('AccountID' => 'Required|min:7|max:7', 'password' => 'Required|min:6|max:20');
     $validator = Validator::make($user, $rules);
     if ($validator->passes()) {
         $check = User::where('StudentID', $in['AccountID'])->where('lastSeen', '>=', date_sub(date_create(MyDate::getNormalDateFormat()), date_interval_create_from_date_string("1 minute")))->first();
         if (!count($check)) {
             $user = array('StudentID' => $in['AccountID'], 'password' => $in['password']);
             if (Auth::attempt($user)) {
                 User::updateLastSeen();
                 User::addLoginRecord();
                 return Redirect::to('/');
             } else {
                 return Redirect::back()->withErrors(array('password' => 'Account ID and Password not matched'))->withInput(Input::except('password'));
             }
         } else {
             return Redirect::back()->withErrors(array('password' => 'Your account is currently online. Multiple login session is not allowed.'))->withInput(Input::except('password'));
         }
     }
     return Redirect::back()->withErrors($validator)->withInput(Input::except('password'));
 }
Beispiel #12
0
    ?>
</td>
            <td><?php 
    echo $e->mail_to;
    ?>
</td>
            <td><?php 
    echo $e->title;
    ?>
</td>
            <td><?php 
    echo MyDate::show($e->date_create, TRUE);
    ?>
</td>
            <td><?php 
    echo $e->date_send == '0000-00-00 00:00:00' ? 'Неизвестно' : MyDate::show($e->date_send, TRUE);
    ?>
</td>
            <td><?php 
    echo $td_text;
    ?>
</td>
            <td>
                <?php 
    echo HTML::anchor('admin/email', 1);
    ?>
            </td>
        </tr>
    <?php 
}
?>
Beispiel #13
0
    <div style="font-size: 20px;  overflow: hidden; font-family: Times New Roman">
        <?php 
echo HTML::image('assets/img/logo.png', array('width' => 130, 'align' => 'left', 'hspace' => 20));
?>
        <div style="padding-top: 20px;">
            <p style="margin-bottom: 10px;">Ассоциация Автосервисов <strong style="font-weight: normal;">www.as-avtoservice.ru</strong> </p>
            <p>Купон на скидку от <?php 
echo $type . ' ' . $service_name;
?>
</p>
        </div>
    </div>
    <br />
    <hr style="clear: both; margin-top: 5px; color: #e0e0e0;" />
    <p align="right" style="font-size: 14px; ">Дата распечатки: <?php 
echo MyDate::show(Date::formatted_time(), TRUE);
?>
</p>
    <p style="clear: both; font-size: 16px; font-family: Verdana; margin-top: 5px"><?php 
echo $text;
?>
</p>
    <p class="button" align="center" style="margin-top: 20px;">
    <a href="#" class="button_print">
    <img src="http://www.as-avtoservice.ru/assets/img/print_cupon.png">
    </a>
    </p>
</div>


                </div>

                <div class="form-group">
                    {{Form::submit('Submit', ['class'=>'btn btn-sm btn-primary pull-right'])}}
                </div>
            {{Form::close()}}
        @else
            <div class="alert alert-info margin-top-sm">No groups available.</div>
        @endif
        <h4 class="title">Designations</h4>
        <hr id="fit">
        @if(count($designations))
            <div class="list-group margin-top-sm">
                @foreach($designations as $designation)
                     <?php 
$done = MyDate::onGoing($designation->deadline, date('Y-m-d'));
?>

                    <div class="list-group-item clearfix">
                        <a href="#" class="pull-right" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-angle-down"></i> </a>
                         <span class="pull-right margin-right-sm">
                             {{GroupPageHelper::activityStatus($done)}}
                         </span>
                        <ul class="dropdown-menu dropdown-menu-right" style="top:10%;" role="menu">
                            <li><a href="#">
                                <span id="name" data-target="/quiz/view/result/{{$quiz->id . '/' . $designation->id}}">
                                    <i class="fa fa-renren fa-fw"></i> View Result
                                </span>
                                </a>
                            </li>
                            <li><a href="#">
Beispiel #15
0
    </thead>
    <tbody>
    <?php 
foreach ($task->order_by('status', 'ASC')->order_by('priority', 'DESC')->find_all() as $t) {
    ?>
        <?php 
    $disputes_count = count($t->disputes->find_all());
    $choose_statuses = array_diff_key($statuses, array($t->status => ''));
    ?>
        <tr>
            <td><?php 
    echo $t->title;
    ?>
</td>
            <td><?php 
    echo MyDate::show($t->date_create, TRUE);
    ?>
</td>
            <td><?php 
    echo $disputes_count == 0 ? 'нет' : $disputes_count;
    ?>
</td>
            <td><?php 
    echo __('task_priority_' . $t->priority);
    ?>
</td>
            <td><span class="<?php 
    echo $statuses[$t->status]['css'];
    ?>
"><?php 
    echo __($statuses[$t->status]['i18n']);
Beispiel #16
0
            <td></td>
        </tr>
        <?php 
    foreach ($vacancy->find_all() as $n) {
        ?>
            <tr>
                <td><?php 
        echo $n->service->name;
        ?>
</td>
                <td><?php 
        echo $n->title;
        ?>
</td>
                <td><?php 
        echo MyDate::show($n->date);
        ?>
</td>
                <td><?php 
        echo HTML::anchor('cabinet/vacancy/edit/' . $n->id, HTML::image('assets/img/icons/c_edit.png'));
        ?>
 <?php 
        echo HTML::anchor('cabinet/vacancy/delete/' . $n->id, HTML::image('assets/img/icons/c_delete.png'));
        ?>
</td>
            </tr>
        <?php 
    }
    ?>
        <tr class="title">
            <td>Компания</td>
 public function executeNew(sfWebRequest $request)
 {
     $this->stock = new stock();
     $this->stock->setDate(MyDate::today());
     $this->form = $this->configuration->getForm($this->stock);
 }
Beispiel #18
0
                <?php 
    } else {
        ?>
                    Неактивен <?php 
        echo HTML::anchor('admin/users/activate/' . $u->id, HTML::image('assets/img/admin/active.png'));
        ?>
                <?php 
    }
    ?>
            </td>
            <td><?php 
    echo $company_count > 0 ? $company_count . HTML::anchor('admin/users/services/' . $u->id, ' просм.') : 'Не имеет компаний';
    ?>
</td>
            <td><?php 
    echo MyDate::show_small($u->date_create);
    ?>
 / <?php 
    echo $u->last_login != NULL ? date('d.m.Y H:i', $u->last_login) : 'ни разу';
    ?>
</td>
            <td><?php 
    echo $u->expires != NULL ? Date::formatted_time($u->expires, 'd.m.Y') : '';
    ?>
</td>
            <td>
                <div class="btn-group">
                    <?php 
    echo HTML::edit_button($u->id, 'admin/users/edit_info', TRUE) . HTML::delete_button($u->id, 'admin/users');
    ?>
                </div>
 public function executeDsrmulti(sfWebRequest $request)
 {
     $requestparams = $request->getParameter("invoice");
     $day = $requestparams["date"]["day"];
     $month = $requestparams["date"]["month"];
     $year = $requestparams["date"]["year"];
     $invoice = new Invoice();
     if (!$day or !$month or !$year) {
         $invoice->setDate(MyDate::today());
     } else {
         $invoice->setDate($year . "-" . $month . "-" . $day);
     }
     $requestparams = $request->getParameter("purchase");
     $day = $requestparams["date"]["day"];
     $month = $requestparams["date"]["month"];
     $year = $requestparams["date"]["year"];
     $purchase = new Purchase();
     if (!$day or !$month or !$year) {
         $purchase->setDate(MyDate::today());
     } else {
         $purchase->setDate($year . "-" . $month . "-" . $day);
     }
     $this->form = new InvoiceForm($invoice);
     $this->toform = new PurchaseForm($purchase);
     $this->purchases = PurchaseTable::fetchByDateRange($invoice->getDate(), $purchase->getDate());
     $this->events = EventTable::fetchByDatenParentclass($purchase->getDate(), "Purchase");
     $this->cashsales = 0;
     $this->chequesales = 0;
     $this->creditsales = 0;
     $this->cashother = 0;
     $this->chequeother = 0;
     $this->creditother = 0;
     $this->cashtotal = 0;
     $this->chequetotal = 0;
     $this->credittotal = 0;
     $this->deducttotal = 0;
     foreach ($this->purchases as $purchase) {
         if ($purchase->getStatus() != "Cancelled") {
             $this->cashsales += $purchase->getCash();
             $this->chequesales += $purchase->getCheque();
             $this->creditsales += $purchase->getCredit();
             $this->cashtotal += $purchase->getCash();
             $this->chequetotal += $purchase->getCheque();
             $this->credittotal += $purchase->getCredit();
             //$this->deducttotal+=$purchase->getDsrdeduction();
         }
     }
     foreach ($this->events as $event) {
         $purchase = $event->getParent();
         if ($purchase->getStatus() != "Cancelled") {
             $this->cashother += $event->getDetail("cashamt");
             $this->chequeother += $event->getDetail("chequeamt");
             $this->creditother += $event->getDetail("creditamt");
             $this->cashtotal += $event->getDetail("cashamt");
             $this->chequetotal += $event->getDetail("chequeamt");
             $this->credittotal += $event->getDetail("creditamt");
             $this->deducttotal += $event->getDetail3();
         }
     }
     $this->total = $this->cashtotal + $this->chequetotal + $this->credittotal;
 }
Beispiel #20
0
foreach ($article->find_all() as $a) {
    ?>
        <?php 
    if ($a->date_edited == '0000-00-00 00:00:00') {
        $a->date_edited = 'ни разу';
    } else {
        $a->date_edited = MyDate::show($a->date_edited, TRUE);
    }
    ?>
        <tr>
            <td><?php 
    echo $a->title;
    ?>
</td>
            <td><?php 
    echo MyDate::show($a->date_create, TRUE) . ' / ' . $a->date_edited;
    ?>
</td>
            <td><?php 
    echo HTML::activate_checker($a->id, $a->active, 'admin/content/article');
    ?>
</td>
            <td>
                <div class="btn-group">
                    <?php 
    echo HTML::edit_button($a->id, 'admin/content/article');
    ?>
                    <?php 
    echo HTML::delete_button($a->id, 'admin/content/article');
    ?>
                </div>
Beispiel #21
0
<?php

defined('SYSPATH') or die('No direct script access.');
?>
<div class="content-group">
    <div class="header with-date">
        <div class="title"><h1><?php 
echo __('review_title_company_' . $review->service->type, array(':company_name' => $review->service->name, ':date' => MyDate::show($review->date)));
?>
</h1></div>
        <div class="date"><?php 
echo MyDate::show($review->date);
?>
</div>
    </div>
    <div class="body">
        <div class="text">
            <?php 
echo $review->text;
?>
        </div>
    </div>
</div>
Beispiel #22
0
        <?php 
echo $task->text;
?>
    </div>
</div>
<div class="row-fluid">
    <h5>Дополнений: <?php 
echo count($task->disputes->find_all());
?>
</h5>
    <?php 
foreach ($task->disputes->find_all() as $d) {
    ?>
        <div class="row-fluid">
            <div style="text-align: right;"><?php 
    echo MyDate::show($d->date_create, TRUE) . ' ' . HTML::delete_button($d->id, 'admin/development/dispute');
    ?>
</div>
            <div><?php 
    echo $d->text;
    ?>
</div>
        </div>
        <hr />
    <?php 
}
?>

    <?php 
echo FORM::open(NULL, array('class' => 'well'));
?>
Beispiel #23
0
    ?>

<div class="grid-row">
    <?php 
    $i = 1;
    foreach ($review as $r) {
        ?>
		<div class="content-group grid-3">
			<div class="grid-content-block">
				<div class="header with-date">
					<div class="title"><?php 
        echo HTML::anchor('services/' . $r->service->id, __('vacancies_news_reviews_title_company_name_' . $r->service->type, array(':genitive_city_name' => $r->service->city->genitive_name, ':company_name' => $r->service->name)));
        ?>
</div>
					<div class="date"><?php 
        echo MyDate::show($r->date);
        ?>
</div>
				</div>
				<div class="body">
					<div class="address"><i class="icon-map-marker"></i> <?php 
        echo $r->service->get_address();
        ?>
</div>
					<noindex>
						<div class="text">
							<?php 
        echo Text::short_story($r->text);
        ?>
							<?php 
        //= HTML::anchor('services/'.$r->service->id.'/reviews/'.$r->id, 'Подробнее');
 public function executeListcheckedout(sfWebRequest $request)
 {
     $this->invoices = Doctrine_Query::create()->from('Invoice i')->where('date="' . MyDate::today() . '"')->orWhere('is_temporary=1')->execute();
 }
            <span id="name" data-target="/group/activities/view/designation/{{$activity->id}}" class="col-2 divider"><i class="fa fa-pencil-square-o fa-fw"></i> Designation</span>
            <span id="name" data-target="/group/activities/view/settings/{{$activity->id}}" class="col-2"><i class="fa fa-cog fa-fw"></i> Settings</span>
        </div>
    </div>

    <div class="container">
        <h5 class="text-info">Description:</h5>
        <hr id="fit">
        <p class="margin-top-sm">{{$activity->description}}</p>
        <h5 class="text-info">Designated Groups</h5>
        <hr id="fit">
        @if(count($activityGroups))
            <div class="list-group margin-top-sm">
                @foreach($activityGroups as $activityGroup)
                    <?php 
$done = MyDate::onGoing($activityGroup->deadline, date('Y-m-d'));
?>

                    <div class="list-group-item clearfix">
                        <span class="pull-left">
                            <span id="name" data-target="/group/activities/view/submission/{{$activityGroup->id}}/{{$activity->id}}">{{$activityGroup->group_page->Name}}</span><br/>
                            <span class="timeago">Deadline: {{date(MyDate::getDateFormat(), strtotime($activityGroup->deadline))}}</span><br/>
                            <span class="timeago">Date Designation: {{date(MyDate::getDateFormat(), strtotime($activityGroup->created_at))}}</span>
                        </span>
                        <span class="pull-right">
                            {{GroupPageHelper::activityStatus($done)}}
                        </span>
                    </div>
                @endforeach
            </div>
        @else
Beispiel #26
0
 public static function isOnline($lastSeen)
 {
     $date1 = date_sub(date_create(MyDate::getNormalDateFormat()), date_interval_create_from_date_string("1 minute"));
     $check = strtotime(MyDate::getNormalDateFormat()) - strtotime($lastSeen) > 1000 ? false : true;
     $check ? User::displayOnlineStatus() : '';
 }
Beispiel #27
0
            <th>Статус</th>
            <th style="width: 72px;">Операции</th>
        </tr>
    </thead>

    <tbody>
    <?php 
foreach ($news->order_by('date', 'DESC')->find_all() as $c) {
    ?>
        <tr>
            <td><?php 
    echo $c->title;
    ?>
</td>
            <td><?php 
    echo MyDate::show($c->date, TRUE);
    ?>
</td>
            <td><?php 
    echo HTML::activate_checker($c->id, $c->active, 'admin/news/world');
    ?>
</td>
            <td><?php 
    echo HTML::edit_button($c->id, 'admin/news/world') . ' ' . HTML::delete_button($c->id, 'admin/news/world');
    ?>
</td>
        </tr>
    <?php 
}
?>
    </tbody>
 public function viewActivity($gid, $id)
 {
     $activity = GroupPageActivityGroup::with('groupPageActivity', 'groupPage')->where('grouppageactivityID', $id)->where('grouppageID', $gid)->first();
     $submittedFile = GroupPageActivityFiles::with('owner')->where('OwnerID', Auth::user()->StudentID)->where('grouppageactivityID', $id)->first();
     if (MyDate::onGoing($activity->deadline, date('Y-m-d H:i:s'))) {
         return Redirect::To('/')->with('message', 'The requested page is unavailable.')->with('url', '');
     }
     return View::make('validated.grouppage.viewActivity', compact('activity', 'submittedFile'));
 }
Beispiel #29
0
 / <?php 
    echo HTML::anchor('admin/services/vacancies/' . $s->id, count($s->vacancies->find_all()), array('style' => 'color: #628ab4'));
    ?>
 / <?php 
    echo HTML::anchor('admin/services/stocks/' . $s->id, count($s->stocks->find_all()), array('style' => 'color: #8a1f11;'));
    ?>
 / <?php 
    echo HTML::anchor('admin/services/reviews/' . $s->id, count($s->reviews->find_all()), array('style' => 'color: #009900;'));
    ?>
</td>
            <td><?php 
    echo $s->date_create == '0000-00-00 00:00:00' ? 'Неизвестно' : MyDate::show_small($s->date_create);
    ?>
                /
                <?php 
    echo $s->date_edited == '0000-00-00 00:00:00' ? 'Ни разу' : MyDate::show_small($s->date_edited);
    ?>
                /
                <?php 
    echo $s->user->last_login != NULL ? date('d.m.Y', $s->user->last_login) : 'ни разу';
    ?>
            </td>
            <td><?php 
    echo HTML::activate_checker($s->id, $s->active, 'admin/services');
    ?>
</td>
            <td>
                <?php 
    echo HTML::edit_button($s->id, 'admin/services') . HTML::delete_button($s->id, 'admin/services');
    ?>
            </td>
Beispiel #30
0
            <th style="width: 45px;"></th>
        </tr>
    </thead>
    <tbody>
    <?php 
foreach ($content->find_all() as $c) {
    ?>
        <tr>
            <td style="width: 300px;">Округ <?php 
    echo $c->district->name . ' г.' . $c->district->city->genitive_name;
    ?>
</td>
            <td><?php 
    echo mb_strlen($c->text) > 0 ? Text::limit_words(strip_tags($c->text), 30) : 'Текст отсутствует';
    ?>
</td>
            <td><?php 
    echo $c->date_edited != '0000-00-00 00:00:00' ? MyDate::show($c->date_edited, TRUE) : 'ни разу';
    ?>
</td>
            <td><?php 
    echo HTML::edit_button($c->id, 'admin/content/district');
    ?>
</td>
        </tr>
    <?php 
}
?>
    </tbody>
</table>