public function getPartners($data) { $partners = ''; $Prices = new Prices(); if (!empty($data)) { foreach ($data as $id => $partner) { $partners[$id]['name'] = $partner->name; // get Partner name. data from db $partners[$id]['url'] = $partner->url; // get Partner url. data from db $partners[$id]['prices'] = $Prices->getPrices($partner->prices); } } return $partners; }
<style> thead{ background-color:white; } </style><?php $cnt = 1; $dates = date('Y-m-d'); $dish = new Dishes(); $stuff = new Halfstaff(); $prod = new Products(); $prices = new Prices(); ?> <table class="table table-bordered table-hover" id="dataTable"> <thead> <tr> <th></th> <th>Наименование блюд</th> <th>Себестоимость</th> <th>Установленная цена</th> <th>Установленная наценка</th> <th>Текущая наценка</th> <th></th> </tr> </thead> <tbody> <?php foreach ($model as $value) { ?> <?php $costPrice = $dish->getCostPrice($value->just_id, $dates);
public function actionShowform($id) { $data = explode('_', $id); $pack = Prices::model()->findByAttributes(array('genre_id' => $data[0], 'package' => $data[1], 'user_id' => Yii::app()->user->id)); if (Yii::app()->user->role == 2) { //videooperator $title = Video::model()->findByAttributes(array('uid' => Yii::app()->user->id, 'id' => $data[0])); } else { $title = Portfolio::model()->findByAttributes(array('uid' => Yii::app()->user->id, 'id' => $data[0])); } if (is_object($pack)) { $html = '<form action="/my/prices/update/id/' . $pack->id . '" method="post">'; $html .= '<script> $(document).ready(function() { $("#price__price").keydown(function (e) { // Allow: backspace, delete, tab, escape, enter and . if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110]) !== -1 || // Allow: Ctrl+A (e.keyCode == 65 && e.ctrlKey === true) || // Allow: home, end, left, right, down, up (e.keyCode >= 35 && e.keyCode <= 40)) { return; } // Ensure that it is a number and stop the keypress if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) { e.preventDefault(); } }); }); </script>'; $html .= '<div class="tooltip_cost_title">' . $title->title . '</div> <label for="albom__name" class="tool_label" style="margin-top: 25px;">Цена</label> <input type="text" name="Prices[price]" value="' . $pack->price . '" id="price__price" class="default__input search__hidden__input--city" maxlength="7" title="Это поле обязательно для заполнение" placeholder="500 грн" required=""> <label for="albom__name" class="tool_label">Описание</label> <textarea name="Prices[about]" id="about__user" cols="25" rows="10" class="default__textarea" placeholder="Описание услуги:">' . $pack->about . '</textarea> <div class="col-12 text_center" style="margin-top: 25px;"> <div class="btn__group clfx"> <div class="col-179"> <button type="button" class="t-cls cabinet__profile__btn" id="close_tip" onclick="closeTip(\'' . $id . '\')">ОТМЕНА</button> </div> <div class="col-179"> <input type="hidden" name="Prices[user_id]" value="' . Yii::app()->user->id . '" /> <input type="hidden" name="Prices[package]" value="' . $data[1] . '" /> <input type="hidden" name="Prices[genre_id]" value="' . $data[0] . '" /> <button type="submit" class="t-cls cabinet__profile__btn cabinet__profile__btn-submit">СОХРАНИТЬ</button> </div> </div> </div> </form>'; } else { $html = '<form action="/my/prices/create/" method="post">'; $html .= '<div class="tooltip_cost_title">' . $title->title . '</div> <label for="albom__name" class="tool_label" style="margin-top: 25px;">Цена</label> <input type="text" name="Prices[price]" id="albom__name" class="default__input search__hidden__input--city" title="Это поле обязательно для заполнение" placeholder="500 грн" required=""> <label for="albom__name" class="tool_label">Описание</label> <textarea name="Prices[about]" id="about__user" cols="25" rows="10" class="default__textarea" placeholder="Описание услуги:"></textarea> <div class="col-12 text_center" style="margin-top: 25px;"> <div class="btn__group clfx"> <div class="col-179"> <button type="button" class="t-cls cabinet__profile__btn" id="close_tip" onclick="closeTip(\'' . $id . '\')">ОТМЕНА</button> </div> <div class="col-179"> <input type="hidden" name="Prices[user_id]" value="' . Yii::app()->user->id . '" /> <input type="hidden" name="Prices[package]" value="' . $data[1] . '" /> <input type="hidden" name="Prices[genre_id]" value="' . $data[0] . '" /> <button type="submit" class="t-cls cabinet__profile__btn cabinet__profile__btn-submit">СОХРАНИТЬ</button> </div> </div> </div> </form>'; } echo $html; }
public function actionShowform($id) { $data = explode('_', $id); $pack = Prices::model()->findByAttributes(array('genre_id' => $data[0], 'package' => $data[1], 'user_id' => Yii::app()->user->id)); if (is_object($pack)) { $html = '<form action="/my/prices/update/id/' . $pack->id . '" method="post">'; $html .= '<div class="tooltip_cost_title">' . Genre::getName($data[0]) . '</div> <label for="albom__name" class="tool_label" style="margin-top: 25px;">Цена</label> <input type="text" name="Prices[price]" value="' . $pack->price . '" id="albom__name" class="default__input search__hidden__input--city" title="Это поле обязательно для заполнение" placeholder="500 грн" required=""> <label for="albom__name" class="tool_label">Описание</label> <textarea name="Prices[about]" id="about__user" cols="25" rows="10" class="default__textarea" placeholder="Описание услуги:">' . $pack->about . '</textarea> <div class="col-12 text_center" style="margin-top: 25px;"> <div class="btn__group clfx"> <div class="col-179"> <button type="clear" class="t-cls cabinet__profile__btn">ОТМЕНА</button> </div> <div class="col-179"> <input type="hidden" name="Prices[user_id]" value="' . Yii::app()->user->id . '" /> <input type="hidden" name="Prices[package]" value="' . $data[1] . '" /> <input type="hidden" name="Prices[genre_id]" value="' . $data[0] . '" /> <button type="submit" class="t-cls cabinet__profile__btn cabinet__profile__btn-submit">СОХРАНИТЬ</button> </div> </div> </div> </form>'; } else { $html = '<form action="/prices/create/" method="post">'; $html .= '<div class="tooltip_cost_title">' . Genre::getName($data[0]) . '</div> <label for="albom__name" class="tool_label" style="margin-top: 25px;">Цена</label> <input type="text" name="Prices[price]" id="albom__name" class="default__input search__hidden__input--city" title="Это поле обязательно для заполнение" placeholder="500 грн" required=""> <label for="albom__name" class="tool_label">Описание</label> <textarea name="Prices[about]" id="about__user" cols="25" rows="10" class="default__textarea" placeholder="Описание услуги:"></textarea> <div class="col-12 text_center" style="margin-top: 25px;"> <div class="btn__group clfx"> <div class="col-179"> <button type="clear" class="t-cls cabinet__profile__btn">ОТМЕНА</button> </div> <div class="col-179"> <input type="hidden" name="Prices[user_id]" value="' . Yii::app()->user->id . '" /> <input type="hidden" name="Prices[package]" value="' . $data[1] . '" /> <input type="hidden" name="Prices[genre_id]" value="' . $data[0] . '" /> <button type="submit" class="t-cls cabinet__profile__btn cabinet__profile__btn-submit">СОХРАНИТЬ</button> </div> </div> </div> </form>'; } echo $html; }
<?php $cnt = 1; $dish = new Dishes(); $stuff = new Halfstaff(); $prod = new Products(); $prices = new Prices(); ?> <style> .green{ color: green; } .red{ color: red; } .rait{ padding: 0 8px!important; } thead{ background-color: #ffffff; } </style> <table class="table table-bordered table-stripped" id="dataTable"> <thead> <tr> <th></th> <th>Наимен. блюда</th> <th>Себестоимость (сум)</th> <th>Цена реализации (сум)</th> <th>наценка план (%)</th> <th>наценка факт (%)</th>
public function actionAjaxDishIncome() { $prices = new Prices(); $dishCnt = array(); $dCount = array(); $prodCnt = array(); $pCount = array(); $stuffCnt = array(); $sCount = array(); $dish = new Dishes(); $stuff = new Halfstaff(); $prod = new Products(); $model = Expense::model()->with('order.dish')->findAll('date(t.order_date) BETWEEN :from AND :to', array(':from' => $_POST['from'], ':to' => $_POST['to'])); if (!empty($model)) { foreach ($model as $value) { foreach ($value->getRelated('order') as $val) { $dishes[$val->just_id] = $val->getRelated('dish')->name; $dishCnt[$val->just_id] = $dishCnt[$val->just_id] + $val->count * $prices->getPrice($val->just_id, $value->mType, $val->type, $value->order_date) - $dish->getCostPrice($val->just_id, $value->order_date); $dCount[$val->just_id] = $dCount[$val->just_id] + $val->count; } } } $model2 = Expense::model()->with('order.halfstuff')->findAll('date(t.order_date) BETWEEN :from AND :to', array(':from' => $_POST['from'], ':to' => $_POST['to'])); if (!empty($model2)) { foreach ($model2 as $value) { foreach ($value->getRelated('order') as $val) { $halfstuff[$val->just_id] = $val->getRelated('halfstuff')->name; $stuffCnt[$val->just_id] = $stuffCnt[$val->just_id] + $val->count * $prices->getPrice($val->just_id, $value->mType, $val->type, $value->order_date) - $stuff->getCostPrice($val->just_id, $value->order_date); $sCount[$val->just_id] = $sCount[$val->just_id] + $val->count; } } } $model3 = Expense::model()->with('order.products')->findAll('date(t.order_date) BETWEEN :from AND :to', array(':from' => $_POST['from'], ':to' => $_POST['to'])); if (!empty($model3)) { foreach ($model3 as $value) { foreach ($value->getRelated('order') as $val) { $products[$val->just_id] = $val->getRelated('products')->name; $prodCnt[$val->just_id] = $prodCnt[$val->just_id] + $val->count * $prices->getPrice($val->just_id, $value->mType, $val->type, $value->order_date) - $prod->getCostPrice($val->just_id, $value->order_date); $pCount[$val->just_id] = $pCount[$val->just_id] + $val->count; } } } $this->renderPartial('ajaxDishIncome', array('dishes' => $dishes, 'dishCnt' => $dishCnt, 'halfstuff' => $halfstuff, 'stuffCnt' => $stuffCnt, 'products' => $products, 'prodCnt' => $prodCnt, 'dCount' => $dCount, 'sCount' => $sCount, 'pCount' => $pCount)); }
/* @var $model Expense */ if (!isset($_GET['asModal'])) { $box = $this->beginWidget('bootstrap.widgets.TbBox', array('title' => 'View Expenses #' . $dishModel[0]->expense_id, 'headerIcon' => 'icon- fa fa-eye', 'headerButtons' => array(array('class' => 'bootstrap.widgets.TbButtonGroup', 'type' => 'success')))); } ?> <?php $this->widget('bootstrap.widgets.TbAlert', array('block' => false, 'fade' => true, 'closeText' => '×', 'alerts' => array('success' => array('block' => true, 'fade' => true, 'closeText' => '×'), 'info' => array('block' => true, 'fade' => true, 'closeText' => '×'), 'warning' => array('block' => true, 'fade' => true, 'closeText' => '×'), 'error' => array('block' => true, 'fade' => true, 'closeText' => '×'), 'danger' => array('block' => true, 'fade' => true, 'closeText' => '×')))); ?> <?php $count = 1; $summ = 0; $curPercent = 0; $prices = new Prices(); ?> <table class="table table-hover table-bordered"> <thead> <tr> <th></th> <th>Название</th> <th>Количество</th> <th>Цена</th> <th>Сумма</th> </tr> </thead> <tbody> <?php foreach ($dishModel as $value) { ?>
public function getPrice($id, $mType, $types, $dates) { $dates = date('Y-m-d', strtotime($dates)); $model = Prices::model()->find(array('condition' => 'date(price_date) <= :dates AND just_id = :id AND menu_type = :mType AND types = :types', 'order' => 'price_date DESC', 'limit' => 1, "together" => true, 'params' => array(':id' => $id, ':mType' => $mType, ':types' => $types, ':dates' => $dates))); if (empty($model)) { $model2 = Prices::model()->find(array('condition' => 'just_id = :id AND menu_type = :mType AND types = :types', 'order' => 'price_date DESC', 'limit' => 1, "together" => true, 'params' => array(':id' => $id, ':mType' => $mType, ':types' => $types))); return $model2->price; } else { return $model->price; } }
public function getExpenseSum($id, $dates) { $summ = 0; $prices = new Prices(); $model = Expense::model()->with('order.dish')->findByPk($id); $model2 = Expense::model()->with('order.halfstuff')->findByPk($id); $model3 = Expense::model()->with('order.products')->findByPk($id); if (!empty($model)) { foreach ($model->getRelated('order') as $val) { $summ = $summ + $prices->getPrice($val->just_id, 1, 1, $dates) * $val->count; } } if (!empty($model2)) { foreach ($model2->getRelated('order') as $val) { $summ = $summ + $prices->getPrice($val->just_id, 1, 2, $dates) * $val->count; } } if (!empty($model3)) { foreach ($model3->getRelated('order') as $val) { $summ = $summ + $prices->getPrice($val->just_id, 1, 3, $dates) * $val->count; } } return $summ; }
?> <?php echo $form->textField($model, 'DocCustumer', array('id' => "DocCustumer", 'class' => 'span12')); ?> <?php echo $form->error($model, 'DocCustumer'); ?> </div> </div> <div class="row-fluid"> <div class ="span4"> <?php $idPrices = $model->SepcialityID; //$Set = Prices::GetPrice($idPrices); $model->AcademicSemesterID = Prices::model()->find("SpecialityID = {$idPrices}")->PriceSemesterInNumbers; echo $form->labelEx($model, 'AcademicSemesterID', array('class' => 'span12')); ?> <?php echo $form->textField($model, 'AcademicSemesterID', array('id' => "AcademicSemesterID", 'class' => 'span12', 'readonly' => true)); ?> <?php echo $form->error($model, 'AcademicSemesterID'); //echo $Set = Prices::GetPrice($idPrices); ?> </div> <div class ="span4"> <?php echo $form->labelEx($model, 'CustomerPaymentDetails'); //,array('class'=>'span3'));
public function getMenuList() { $menuList = array(); $price = new Prices(); $dates = date('Y-m-d'); $dishModel = Menu::model()->with('dish')->findAll(); $stuffModel = Menu::model()->with('halfstuff')->findAll(); $prodModel = Menu::model()->with('products')->findAll(); foreach ($dishModel as $val) { $menuList['dish_' . $val->just_id] = $val->getRelated('dish')->name . "_" . $price->getPrice($val->just_id, $val->mType, $val->type, $dates); } foreach ($stuffModel as $val) { $menuList['stuff_' . $val->just_id] = $val->getRelated('halfstuff')->name . "_" . $price->getPrice($val->just_id, $val->mType, $val->type, $dates); } foreach ($prodModel as $val) { $menuList['product_' . $val->just_id] = $val->getRelated('products')->name . "_" . $price->getPrice($val->just_id, $val->mType, $val->type, $dates); } return $menuList; }
echo '<td><span data-set="' . $val->id . '_3">0</span></td>'; } } $pack4 = Prices::model()->findByAttributes(array('genre_id' => $val->id, 'package' => 4, 'user_id' => Yii::app()->user->id)); if (is_object($pack4)) { $tip = "<span class='close__tip' onClick=close_tip()>X</span><div class='tooltip_cost_edit' id='tip_edit_" . $val->id . "_4'>редактировать</div><div class='tooltip_cost_title'>" . $val->title . "</div>\n <p class='tooltip_cost_text'>Описание услуги: " . $pack4->about . "</p>"; echo '<td><span class="tooltipster" id="tip_' . $val->id . '_4" title="' . $tip . '" data-text="' . $tip . '" data-set="' . $val->id . '_4" onmouseover="show(\'' . $val->id . '_4\')">' . $pack4->price . ' <div class="cost-info"></div></span></td>'; } else { if (is_object($pack3)) { $tip = "<span class='close__tip' onClick=close_tip()>X</span><div class='tooltip_cost_edit' id='tip_edit_" . $val->id . "_4'>редактировать</div><div class='tooltip_cost_title'>" . $val->title . "</div>\n <p class='tooltip_cost_text'>Описание услуги: </p>"; echo '<td><span class="tooltipster" id="tip_' . $val->id . '_4" title="' . $tip . '" data-set="' . $val->id . '_4" onmouseover="show(\'' . $val->id . '_4\')">0 <div class="cost-info"></div></span></td>'; } else { echo '<td><span data-set="' . $val->id . '_4">0</span></td>'; } } $pack5 = Prices::model()->findByAttributes(array('genre_id' => $val->id, 'package' => 5, 'user_id' => Yii::app()->user->id)); if (is_object($pack5)) { $tip = "<span class='close__tip' onClick=close_tip()>X</span><div class='tooltip_cost_edit' id='tip_edit_" . $val->id . "_5'>редактировать</div><div class='tooltip_cost_title'>" . $val->title . "</div>\n <p class='tooltip_cost_text'>Описание услуги: " . $pack5->about . "</p>"; echo '<td><span class="tooltipster" id="tip_' . $val->id . '_5" title="' . $tip . '" data-text="' . $tip . '" data-set="' . $val->id . '_5" onmouseover="show(\'' . $val->id . '_5\')">' . $pack5->price . ' <div class="cost-info"></div></span></td>'; } else { if (is_object($pack4)) { $tip = "<span class='close__tip' onClick=close_tip()>X</span><div class='tooltip_cost_edit' id='tip_edit_" . $val->id . "_5'>редактировать</div><div class='tooltip_cost_title'>" . $val->title . "</div>\n <p class='tooltip_cost_text'>Описание услуги: </p>"; echo '<td><span class="tooltipster" id="tip_' . $val->id . '_5" title="' . $tip . '" data-set="' . $val->id . '_5" onmouseover="show(\'' . $val->id . '_5\')">0 <div class="cost-info"></div></span></td>'; } else { echo '<td><span data-set="' . $val->id . '_5">0</span></td>'; } } echo '</tr>'; //endif; } ?>
<?php $prices = new Prices(); echo CHtml::dropDownList('dish_id', '', $dishList, array('empty' => '--Выберите блюда--', 'class' => '', 'id' => 'dish')); ?> <?php echo CHtml::dropDownList('halfstuff_id', '', $stuffList, array('empty' => '--Выберите полуфабрикат--', 'class' => '', 'id' => 'halfstuff')); ?> <?php echo CHtml::dropDownList('product_id', '', $prodList, array('empty' => '--Выберите продукт--', 'class' => '', 'id' => 'product')); ?> </div> <br /><br /> <div class="form-group"> <table id="menuList" class="table table-hover table-bordered "> <thead> <tr> <th style="text-align:center;">Название продукта</th> <th style="text-align:center;">Цена</th> <th></th> </tr> </thead> <tbody> <?php if (!empty($dishModel)) { } ?>
public function priceAdd($id, $mType, $price, $types) { $model = new Prices(); $dates = date('Y-m-d H:i:s'); $model->price_date = $dates; $model->price = $price; $model->menu_type = $mType; $model->just_id = $id; $model->types = $types; $model->save(); }
echo '<td><span data-set="' . $val . '_3">0грн</span></td>'; } } $pack4 = Prices::model()->findByAttributes(array('genre_id' => $val, 'package' => 4)); if (is_object($pack4)) { $tip = "<div class='tooltip_cost_edit'>редактировать</div><div class='tooltip_cost_title'>" . Genre::getName($val) . "</div>\n <p class='tooltip_cost_text'>Описание услуги: " . $pack4->about . "</p>"; echo '<td><span class="tooltipster" title="' . $tip . '" data-set="' . $val . '_4">' . $pack4->price . 'грн <div class="cost-info"></div></span></td>'; } else { if (is_object($pack3)) { $tip = "<div class='tooltip_cost_edit'>редактировать</div><div class='tooltip_cost_title'>" . Genre::getName($val) . "</div>\n <p class='tooltip_cost_text'>Описание услуги: </p>"; echo '<td><span class="tooltipster" title="' . $tip . '" data-set="' . $val . '_4">0грн <div class="cost-info"></div></span></td>'; } else { echo '<td><span data-set="' . $val . '_4">0грн</span></td>'; } } $pack5 = Prices::model()->findByAttributes(array('genre_id' => $val, 'package' => 5)); if (is_object($pack5)) { $tip = "<div class='tooltip_cost_edit'>редактировать</div><div class='tooltip_cost_title'>" . Genre::getName($val) . "</div>\n <p class='tooltip_cost_text'>Описание услуги: " . $pack5->about . "</p>"; echo '<td><span class="tooltipster" title="' . $tip . '" data-set="' . $val . '_5">' . $pack5->price . 'грн <div class="cost-info"></div></span></td>'; } else { if (is_object($pack4)) { $tip = "<div class='tooltip_cost_edit'>редактировать</div><div class='tooltip_cost_title'>" . Genre::getName($val) . "</div>\n <p class='tooltip_cost_text'>Описание услуги: </p>"; echo '<td><span class="tooltipster" title="' . $tip . '" data-set="' . $val . '_5">0грн <div class="cost-info"></div></span></td>'; } else { echo '<td><span data-set="' . $val . '_5">0грн</span></td>'; } } echo '</tr>'; } ?> </table>
/** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. * @param integer the ID of the model to be loaded */ public function loadModel($id) { $model = Prices::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
/** * Deletes a particular model. * If deletion is successful, the browser will be redirected to the 'admin' page. * @param integer $id the ID of the model to be deleted */ public function actionDelete($id) { //$model=$this->loadModel($id); Prices::model()->deleteAll('upload_file_id =:upload_file_id', array('upload_file_id' => $id)); $this->loadModel($id)->delete(); // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser if (!isset($_GET['ajax'])) { $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin')); } }
<?php /************************************************************************/ $all_users = Users::getAll(); foreach ($all_users as $user) { echo "<option value='{$user->user_id}'>{$user->user_id}. {$user->user_name} {$user->user_surname}</option>"; } /**************************************************************************/ ?> </select> <br> <i class="fa fa-money"></i> <label for="how_much">Koliko:</label> <select class="form-control" id="how_much" name="how_much"> <option value="-1">Izaberite koliko:</option> <?php /************************************************************************************************/ $all_prices = Prices::getAll(); foreach ($all_prices as $price) { echo "<option value='{$price->price_id}'>{$price->price_name} {$price->price} din </option>"; } /************************************************************************************************/ ?> </select> <br> <i class="fa fa-calendar"></i> <label for="month">Za mesec:</label> <br> <select class="form-control" id="month" name="month"> <option vaule="-1">Izaberite mesec:</option> <option value="Januar">Januar</option> <option value="Februar">Februar</option> <option value="Mart">Mart</option> <option value="April">April</option>
public function actionSetPrice() { $dates = date('Y-m-d H:i:s'); $model = Menu::model()->with('dish')->findAll(); foreach ($model as $val) { $price = new Prices(); $price->price_date = $dates; $price->price = $val->getRelated('dish')->price; $price->menu_type = $val->mType; $price->just_id = $val->just_id; $price->types = $val->type; $price->save(); } $model2 = Menu::model()->with('halfstuff')->findAll(); foreach ($model2 as $val) { $price = new Prices(); $price->price_date = $dates; $price->price = $val->getRelated('halfstuff')->price; $price->menu_type = $val->mType; $price->just_id = $val->just_id; $price->types = $val->type; $price->save(); } $model3 = Menu::model()->with('products')->findAll(); foreach ($model3 as $val) { $price = new Prices(); $price->price_date = $dates; $price->price = $val->getRelated('products')->price; $price->menu_type = $val->mType; $price->just_id = $val->just_id; $price->types = $val->type; $price->save(); } }
<?php $cnt = 1; $prod = new Products(); $stuff = new Halfstaff(); $price = new Prices(); $dish = new Dishes(); $sum = 0; ?> <style> thead{ background-color:white; } </style> <table id="dataTable" class="table table-bordered table-hover"> <thead> <tr> <th></th> <th>Наименование</th> <th>Кол-во</th> <th>Сумма (сум) </th> </tr> </thead> <tbody> <?php if (!empty($model)) { foreach ($model as $val) { if ($val['count'] != 0) { ?> <tr>