コード例 #1
0
 protected function getContent()
 {
     // Prepara formulário de pesquisa
     $dataArr['ajax'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => true]];
     $dataArr['page'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => 1]];
     $dataArr['name'] = ["type" => Config::read('form.input'), "data" => (object) ["text" => Text::read('form.product')]];
     $dataArr['btnSearch'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.search'), "class" => "primary", "icon" => "glyphicon-search"]];
     $form = new Form("mySearch");
     $form->setHorizontal();
     $searchForm = $form->createForm($dataArr);
     ob_start();
     ?>
         <div class="container">
           <div class="row">
             <a id="toogleFilter" class="pull-right" data-toggle="collapse" data-target="#collapseFilter" href="#">
                 <span class="text">Exibir Filtros </span><span class="glyphicon glyphicon-menu-down"></span>
             </a>
             <div id="collapseFilter" class="panel-body panel-collapse collapse">
                 <?php 
     echo $searchForm;
     ?>
             </div>
           </div>
         </div>
     
         <div id="resultPanel" class="panel-body table-responsive">
             <?php 
     echo $this->result;
     ?>
         </div>
     <?php 
     return ob_get_clean();
 }
コード例 #2
0
    protected function getContent()
    {
        ob_start();
        ?>
			<div class="jumbotron text-center">
			  <h1>
				<span class="glyphicon glyphicon-time"></span>
				<?php 
        echo Text::read('message.login.session.inactive');
        ?>
			  </h1>
			  <h2>
				<a class="btn btn-lg btn-info" href="<?php 
        echo Config::read('page.url.login');
        ?>
">
				  <span class="glyphicon glyphicon-home"></span>&nbsp;
				  <?php 
        echo Text::read('message.login.session.return');
        ?>
				</a>
			  </h2>
			</div>
		<?php 
        return ob_get_clean();
    }
コード例 #3
0
ファイル: class.ContactView.php プロジェクト: sohflp/Hooked
 protected function getContent()
 {
     // Inicializa assistente de formul‡rio
     $form = new Form("myDetail");
     $dataArr['ajax'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => true]];
     $dataArr['name'] = ["type" => Config::read('form.input'), "data" => (object) ["text" => Text::read('form.name'), "length" => 100]];
     $dataArr['email'] = ["type" => Config::read('form.input'), "data" => (object) ["text" => Text::read('form.email'), "length" => 50]];
     $dataArr['message'] = ["type" => Config::read('form.textarea'), "data" => (object) ["text" => Text::read('form.message')]];
     $dataArr['btnSend'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.send'), "class" => "success btn-lg"]];
     $messageForm = $form->createForm($dataArr);
     unset($dataArr);
     ob_start();
     ?>
         <div class="container">
             <div class="row cadastro">
                 <div class="col-md-4 col-md-offset-4">
                     <?php 
     echo $messageForm;
     ?>
                 </div>
             </div>
         </div>
     <?php 
     return ob_get_clean();
 }
コード例 #4
0
ファイル: class.BaseView.php プロジェクト: sohflp/Hooked
 protected function getTitle()
 {
     if (Text::read('title.' . $this->pageId)) {
         return Text::read('title.' . $this->pageId) . " | " . Text::read('title');
     }
     return Text::read('title');
 }
コード例 #5
0
    protected function getContent()
    {
        // Inicializa assistente de formulário
        $form = new Form("myDetail");
        $dataArr['ajax'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => true]];
        $dataArr['name'] = ["type" => Config::read('form.input'), "data" => (object) ["text" => Text::read('form.name'), "length" => 50]];
        $dataArr['surname'] = ["type" => Config::read('form.input'), "data" => (object) ["text" => Text::read('form.surname'), "length" => 50]];
        $dataArr['sex'] = ["type" => Config::read('form.radio'), "data" => (object) ["text" => Text::read('form.sex'), "value" => [(object) ["id" => 1, "text" => Text::read('form.man')], (object) ["id" => 2, "text" => Text::read('form.woman')]], "checked" => 1]];
        $dataArr['email'] = ["type" => Config::read('form.input'), "data" => (object) ["text" => Text::read('form.email'), "length" => 50]];
        $dataArr['password'] = ["type" => Config::read('form.password'), "data" => (object) ["text" => Text::read('form.password'), "length" => 20]];
        $dataArr['news'] = ["type" => Config::read('form.checkbox'), "data" => (object) ["text" => Text::read('form.newsletter'), "checked" => true]];
        $dataArr['btnSave'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.save'), "class" => "success btn-lg"]];
        $accountForm = $form->createForm($dataArr);
        unset($dataArr);
        ob_start();
        ?>
          <div class="container">
            <div class="row cadastro">
              <div class="col-md-4 col-md-offset-4">
                <?php 
        echo $accountForm;
        ?>
              </div>
            </div>
          </div>
		<?php 
        return ob_get_clean();
    }
コード例 #6
0
 protected function ajaxCallbackForDetail()
 {
     // Executa validações dos campos no Formulário
     $validation = $this->executeFormValidation();
     if ($validation['error']) {
         // Mensagem de erro devido a validação de campos
         $json['message']['type'] = "error";
         $json['message']['text'] = Text::read('message.error');
     } else {
         // Atualiza / Insere na base de dados
         if ($this->myView->data->id) {
             $this->myModel->update($this->myView->data);
         } else {
             // Retorna novo ID para o formulário web
             $json['newID'] = $this->myModel->insert($this->myView->data);
         }
         // Recupera mensagens de erro
         if ($this->myModel->getMessage()) {
             $json['message'] = $this->myModel->getMessage();
             if ($this->myModel->getTechnicalMessage()) {
                 $json['message']['text'] = "<a id='ajaxErrorDetail' href='#'>" . $json['message']['text'] . "</a>";
                 $json['message']['technical'] = $this->myModel->getTechnicalMessage();
             }
         }
     }
     // Recupera mensagens de erro individuais e envia para JSON
     $json['validation'] = $validation['messages'];
     // Transfere dados criação/atualização do registro
     $this->myView->info = $this->myModel->selectForInfo($this->myView->data->id);
     $json['info'] = $this->myView->returnInfoList();
     return $json;
 }
コード例 #7
0
 protected function remove()
 {
     if (!$this->id) {
         $error = new Error(__METHOD__, Text::read('message.ID.error'));
         die($error->getView());
     }
     // Ajax Callback
     $this->ajaxCallback();
 }
コード例 #8
0
ファイル: class.User.php プロジェクト: sohflp/Hooked
 protected function ajaxCallbackForRemove()
 {
     if ($this->id == 1) {
         $json['message'] = Text::alertMessage("danger", Text::read('message.user.admin.error'));
     } else {
         $json = $this->__ajaxCallbackForRemove();
     }
     return $json;
 }
コード例 #9
0
ファイル: class.Account.php プロジェクト: sohflp/Hooked
 protected function detail()
 {
     if (!$this->id) {
         $error = new Error(__METHOD__, Text::read('message.ID.error'));
         die($error->getView());
     }
     $this->myView = new AccountDetailView();
     $this->myModel = new AccountModel();
     $this->__detail();
 }
コード例 #10
0
ファイル: class.LoginView.php プロジェクト: sohflp/Hooked
 protected function getContent()
 {
     // Prepara o formulário de login
     $dataArr['ajax'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => true]];
     $dataArr['type'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => 1]];
     $dataArr['user'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $_POST['user'], "text" => Text::read('form.user')]];
     $dataArr['password'] = ["type" => Config::read('form.password'), "data" => (object) ["value" => $_POST['password'], "text" => Text::read('form.password')]];
     $dataArr['btnLogin'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.login'), "class" => "default"]];
     $form = new Form("myLogin");
     $form->setHorizontal();
     $loginForm = $form->createForm($dataArr);
     return '<div class="jumbotron">' . $loginForm . '</div>';
 }
コード例 #11
0
ファイル: class.ProductTable.php プロジェクト: sohflp/Hooked
    public function createTable($pageId, $data)
    {
        if ($this->total > 0) {
            $controller = "product";
            ob_start();
            ?>
              <div class="container">
                <div class="row query">
                  <div class="col-md-8">
                    <p><?php 
            echo Text::read('table.total') . ": " . $this->total;
            ?>
</p>
                  </div>
                </div>
              </div>

              <div class="container products">
                <?php 
            echo $this->createTableBody($controller, $data);
            ?>
              </div>
				
              <div class="container">
                <div class="row">
                  <div class="text-center">
                    <nav>
                      <ul class="pagination pagination-sm">
                        <?php 
            echo $this->createPagination();
            ?>
                      </ul>
                    </nav>
                  </div>
                </div>
              </div>
			<?php 
            return ob_get_clean();
        }
        ob_start();
        ?>
            <div class="container products text-center">
              <h4><?php 
        echo Text::read('table.empty');
        ?>
</h4>
              <br />
            </div>
        <?php 
        return ob_get_clean();
    }
コード例 #12
0
ファイル: trait.AddressView.php プロジェクト: sohflp/Hooked
 public function getContent()
 {
     // Inicializa assistente de formulário
     $form = new Form("myAddress");
     // Prepara formulário de upload
     $dataArr['street'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->street, "text" => Text::read('form.street'), "length" => 100]];
     $dataArr['number'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->number, "text" => Text::read('form.number'), "length" => 5]];
     $dataArr['complement'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->complement, "text" => Text::read('form.complement'), "length" => 50]];
     $dataArr['local'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->local, "text" => Text::read('form.local'), "length" => 100]];
     $dataArr['city'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->city, "text" => Text::read('form.city'), "length" => 100]];
     $dataArr['state'] = ["type" => Config::read('form.dropdown'), "data" => (object) ["value" => Config::read('combo.states'), "text" => Text::read('form.state'), "selected" => $this->data->state]];
     $dataArr['zipcode'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->zipcode, "text" => Text::read('form.zipcode'), "length" => 9]];
     return $form->createFormFields($dataArr);
 }
コード例 #13
0
ファイル: class.Order.php プロジェクト: sohflp/Hooked
 protected function detail()
 {
     if (!$this->id) {
         $error = new Error(__METHOD__, Text::read('message.ID.error'));
         die($error->getView());
     }
     $this->myView = new OrderDetailView();
     $this->myModel = new OrderModel();
     // Cria ligação com modelo de fotos
     $this->myModel->bindPhotoModel();
     $this->__detail();
     // Cria ligação com a visão de fotos
     $this->myView->bindPhotoReadOnlyView();
 }
コード例 #14
0
ファイル: class.FeatureModel.php プロジェクト: sohflp/Hooked
 public function delete($id)
 {
     $this->mapping->criterias['id'] = new stdclass();
     $this->mapping->criterias['id']->field = 'featureID';
     $this->mapping->criterias['id']->operator = '=';
     $this->mapping->criterias['id']->value = $id;
     try {
         $this->dbh->beginTransaction();
         parent::delete($id);
         $this->dbh->commit();
     } catch (PDOException $exception) {
         $this->dbh->rollback();
         $this->modelException(Text::read('message.model.error.delete'), $exception);
     }
 }
コード例 #15
0
    protected function getContent()
    {
        // Inicializa assistente de formulário
        $form = new Form("myDetail");
        // Prepara formulário de inserção/atualização de dados
        $dataArr['ajax'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => true]];
        $dataArr['id'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => $this->data->id]];
        $dataArr['title'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->title, "text" => Text::read('form.title'), "length" => 100]];
        $detailForm = $form->createFormFields($dataArr);
        unset($dataArr);
        ob_start();
        ?>
			<fieldset>
			  <legend><span class="glyphicon glyphicon-th-list"></span> <?php 
        echo Text::read('form.detail');
        ?>
</legend>
			  <?php 
        echo $detailForm;
        ?>
			</fieldset>
			<fieldset>
			  <legend><span class="glyphicon glyphicon-camera"></span> <?php 
        echo Text::read('form.photo');
        ?>
</legend>
			  <?php 
        echo $this->photoView->getContent();
        ?>
			</fieldset>
			<br />
		<?php 
        $globalForm = ob_get_clean();
        $dataArr['btnSave'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.save'), "class" => "success", "icon" => "glyphicon-floppy-disk"]];
        $detailForm = $form->createForm($dataArr, $globalForm);
        unset($dataArr);
        ob_start();
        ?>
			<div class="panel panel-primary">
			  <div class="panel-body">
				<?php 
        echo $detailForm;
        ?>
			  </div>
			</div>
		<?php 
        return ob_get_clean();
    }
コード例 #16
0
ファイル: class.RoleModel.php プロジェクト: sohflp/Hooked
 public function getComboRoles()
 {
     $this->mapping->table = 'roles';
     $this->mapping->fields['id'] = 'roleID';
     $this->mapping->fields['page'] = 'rolePageID';
     $this->mapping->criterias['id'] = new stdclass();
     $this->mapping->criterias['id']->field = 'roleParentID';
     $this->mapping->criterias['id']->operator = 'IS';
     $this->mapping->criterias['id']->value = NULL;
     $result = parent::select($dummy);
     // Preenche as descrições conforme idioma configurado
     foreach ($result as $row) {
         $row->text = Text::read('title.' . $row->page);
     }
     return $result;
 }
コード例 #17
0
ファイル: class.InboxModel.php プロジェクト: sohflp/Hooked
 public function insert($data)
 {
     $this->mapping->fields['title'] = 'inboxTitle';
     $this->mapping->fields['text'] = 'inboxText';
     $this->mapping->fields['type'] = 'inboxType';
     $this->mapping->fields['reference'] = 'inboxReference';
     $this->mapping->fields['account'] = 'accountID';
     try {
         $this->dbh->beginTransaction();
         $newID = parent::insert($data);
         $this->dbh->commit();
         return $newID;
     } catch (PDOException $exception) {
         $this->dbh->rollback();
         $this->modelException(Text::read('message.model.error.insert'), $exception);
     }
     var_dump($this->getTechnicalMessage());
 }
コード例 #18
0
    protected function getContent()
    {
        // Prepara formulário de pesquisa
        $dataArr['ajax'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => true]];
        $dataArr['page'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => 1]];
        $dataArr['name'] = ["type" => Config::read('form.input'), "data" => (object) ["text" => Text::read('form.name')]];
        $dataArr['email'] = ["type" => Config::read('form.input'), "data" => (object) ["text" => Text::read('form.email')]];
        $dataArr['blocked'] = ["type" => Config::read('form.checkbox'), "data" => (object) ["value" => true, "text" => Text::read('form.only.blocked')]];
        $dataArr['btnSearch'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.search'), "class" => "primary", "icon" => "glyphicon-search"]];
        $form = new Form("mySearch");
        $searchForm = $form->createForm($dataArr);
        ob_start();
        ?>
			<div class="panel panel-primary">
				<div class="panel-heading">
				  <div class="panel-title">&nbsp;
					<a id="toogleFilter" class="pull-right" data-toggle="collapse" data-target="#collapseFilter" href="#">
						<span class="text"></span><span class="glyphicon glyphicon-menu-right"></span>
					</a>
				  </div>
				</div>
				<div id="collapseFilter" class="panel-body panel-collapse collapse in">
				  <?php 
        echo $searchForm;
        ?>
				</div>
			</div>
			
			<div class="panel panel-primary">
			  <div id="resultPanel" class="panel-body table-responsive">
				<h4><?php 
        echo Text::read('table.empty');
        ?>
</h4>
			  </div>
			</div>
		<?php 
        return ob_get_clean();
    }
コード例 #19
0
    protected function getContent()
    {
        // Inicializa assistente de formulário
        $form = new Form("myDetail");
        $dataArr['ajax'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => true]];
        $dataArr['email'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->email, "text" => Text::read('form.email'), "length" => 40]];
        $dataArr['btnConf'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.confirm'), "class" => "success btn-lg"]];
        $passwordForm = $form->createForm($dataArr);
        unset($dataArr);
        ob_start();
        ?>
            <div class="container">
              <div class="row cadastro">
                <div class="col-md-4 col-md-offset-4">
                  <?php 
        echo $passwordForm;
        ?>
                </div>
              </div>
            </div>
		<?php 
        return ob_get_clean();
    }
コード例 #20
0
    protected function getContent()
    {
        // Inicializa assistente de formul�rio
        $form = new Form("myDetail");
        // Prepara formul�rio de inser��o/atualiza��o de dados
        $dataArr['ajax'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => true]];
        $dataArr['id'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => $this->data->id]];
        $dataArr['status'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->statusText, "text" => Text::read('form.status'), "disabled" => true]];
        $dataArr['name'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->name, "text" => Text::read('form.name'), "disabled" => true]];
        $dataArr['text'] = ["type" => Config::read('form.textarea'), "data" => (object) ["value" => $this->data->text, "text" => Text::read('form.description'), "disabled" => true]];
        $dataArr['type'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->type, "text" => Text::read('form.type'), "disabled" => true]];
        $dataArr['subtype'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->subtype, "text" => Text::read('form.subtype'), "disabled" => true]];
        $dataArr['brand'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->brand, "text" => Text::read('form.brand'), "disabled" => true]];
        $detailForm = $form->createFormFields($dataArr);
        unset($dataArr);
        $dataArr['price'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->price, "text" => Text::read('form.price'), "disabled" => true]];
        $dataArr['discount'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->discount, "text" => Text::read('form.discount'), "disabled" => true]];
        $dataArr['account'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => $this->data->account]];
        $dataArr['accName'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->accName, "text" => Text::read('form.createdBy'), "disabled" => true]];
        $priceForm = $form->createFormFields($dataArr);
        unset($dataArr);
        ob_start();
        ?>
			<fieldset>
			  <legend><span class="glyphicon glyphicon-th-list"></span> <?php 
        echo Text::read('form.detail');
        ?>
</legend>
			  <?php 
        echo $detailForm;
        ?>
            </fieldset>

            <fieldset>
                <legend><span class="glyphicon glyphicon-camera"></span> <?php 
        echo Text::read('form.photo');
        ?>
</legend>
                <?php 
        echo $this->photoView->getContent();
        ?>
            </fieldset>

            <fieldset>
                <legend><span class="glyphicon glyphicon-usd"></span> <?php 
        echo Text::read('form.price');
        ?>
</legend>
                <?php 
        echo $priceForm;
        ?>
            </fieldset>
		<?php 
        $globalForm = ob_get_clean();
        $dataArr['btnApprove'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.approve'), "class" => "success", "icon" => "glyphicon-thumbs-up"]];
        $dataArr['btnReprove'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.reprove'), "class" => "danger", "icon" => "glyphicon-thumbs-down"]];
        $detailForm = $form->createForm($dataArr, $globalForm);
        unset($dataArr);
        ob_start();
        ?>
			<div class="panel panel-primary">
			  <div class="panel-body">
				<?php 
        echo $detailForm;
        ?>
				  
			  </div>
			</div>
        
            <!-- MODAL //-->
            <div class="modal fade" id="myReproveModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="exampleModalLabel"><?php 
        echo Text::read('product.reproval.reason');
        ?>
</h4>
                        </div>
        
                        <div class="modal-body">
                            <form>
                                <div class="form-group">
                                    <label for="message-text" class="control-label"><?php 
        echo Text::read('form.message');
        ?>
:</label>
                                    <textarea class="form-control" id="message-text"></textarea>
                                </div>
                            </form>
                        </div>
                        
                        <div class="modal-footer">
                            <button type="button" id="sendReproveMessage" class="btn btn-primary"><?php 
        echo Text::read('form.send');
        ?>
</button>
                        </div>
                    </div>
                </div>
            </div>
		<?php 
        return ob_get_clean();
    }
コード例 #21
0
    protected function getContent()
    {
        ob_start();
        ?>
            <div class="container">
              <!-- NOME DO PRODUTO -->
              <div class="row product-info">
                  <div class="col-md-8">
                      <h2><?php 
        echo $this->data->name;
        ?>
</h2>

                      <span class="ref"><a href="<?php 
        echo Config::read('page.url.product.type') . '/' . $this->data->type->id;
        ?>
"><?php 
        echo $this->data->type->title;
        ?>
</a></span>
        <?php 
        if ($this->data->subtype) {
            ?>
                    / <span class="ref"><a href="<?php 
            echo Config::read('page.url.product.type') . '/' . $this->data->subtype->id;
            ?>
"><?php 
            echo $this->data->subtype->title;
            ?>
</a></span>
        <?php 
        }
        ?>
                  </div>
                  <div class="col-md-4 text-right">
        <?php 
        if ($this->data->brand) {
            if ($this->data->brand->photos[0]) {
                ?>
                      <a href="<?php 
                echo Config::read('page.url.product.brand') . '/' . $this->data->brand->id;
                ?>
">
                          <img src="<?php 
                echo Config::read('url.photos') . '/' . $this->data->brand->album . '/small-' . $this->data->brand->photos[0]->url;
                ?>
" alt="<?php 
                echo $this->data->brand->title;
                ?>
">
                      </a>
        <?php 
            } else {
                ?>
                      <a href="<?php 
                echo Config::read('page.url.product.brand') . '/' . $this->data->brand->id;
                ?>
"><?php 
                echo $this->data->brand->title;
                ?>
</a>
        <?php 
            }
        }
        ?>
                  </div>
              </div>

              <div class="row product-info">
                  <!-- SLIDESHOW -->
                  <div class="col-md-6">
                      <?php 
        echo $this->photoView->getContent();
        ?>
                  </div>

                  <!-- INFOS -->
                  <div class="col-md-6">
                      <!-- DESCRICAO -->
                      <div class="product-detail description">
                          <p><?php 
        echo $this->data->text;
        ?>
</p>
                      </div>

                      <!-- PRECO -->
                      <div class="product-detail price">
        <?php 
        if ($this->data->discount > 0) {
            ?>
                          <span class="discount older-price">De R$ <?php 
            echo $this->data->price;
            ?>
</span>
                          <span class="value">Por R$ <?php 
            echo $this->data->price - $this->data->discount;
            ?>
</span>
        <?php 
        } else {
            ?>
                          <span class="value">R$ <?php 
            echo $this->data->price;
            ?>
</span>
        <?php 
        }
        ?>
                      </div>

                      <!-- CTA -->
                      <div class="product-detail action">
                          <form id="myBuy" method="POST" action="<?php 
        echo Config::read('page.url.order.prebuy');
        ?>
" class="form-inline">
                            <button id="buy" type="button" class="btn btn-success btn-lg btn-block"><?php 
        echo Text::read('product.buy');
        ?>
</button>
                          </form>
                      </div>

                      <!-- FRETE -->
                      <div class="product-detail frete">
                          <p class="help-block"><?php 
        echo Text::read('product.shipping');
        ?>
</p>
                          <form id="myShipping" method="POST" action="<?php 
        echo Config::read('page.url.order.shipping') . '/' . $this->data->id;
        ?>
" class="form-inline">
                              <div class="form-group">
                                  <label class="sr-only" for="cep"><?php 
        echo Text::read('product.zipcode');
        ?>
</label>
                                  <input class="form-control" id="cep" maxlength="9" placeholder="00000-000">
                              </div>
                              <button id="calculateShipping" type="submit" class="btn btn-primary"><?php 
        echo Text::read('product.okay');
        ?>
</button>
                          </form>
                          <div id="shippingInfo" class="frete-resultado"></div>
                      </div>

                      <!-- VENDEDOR -->
                      <div class="product-detail vendedor">
                          <p class="help-block"><?php 
        echo Text::read('product.whoisselling');
        ?>
</p>
                          <div class="row">
                            <a href="<?php 
        echo Config::read('page.url.product.account') . '/' . $this->data->account->id;
        ?>
">
                              <div class="col-md-2">
        <?php 
        if ($this->data->account->photos[0]) {
            ?>
                                  <div class="avatar">
                                      <img style="width:80px;" src="<?php 
            echo Config::read('url.photos') . '/' . $this->data->account->album . '/small-' . $this->data->account->photos[0]->url;
            ?>
">
                                  </div>
        <?php 
        }
        ?>
                              </div>
                              <div class="col-md-8">
                                  <span class="vendedor-name"><?php 
        echo $this->data->account->name;
        ?>
</span>
                                  <span class="vendedor-info"><span class="location"><?php 
        echo $this->data->account->city;
        ?>
</span></span>
                              </div>
                            </a>
                          </div>
                      </div>
                  </div>
              </div>
            </div>
          
          
            <!-- INTERACAOO -->
            <div class="container product-info">
              <div class="row">
                <!-- DUVIDAS E FAQ -->
                <div class="col-md-12">
                  <div class="panel panel-info">
                    <div class="panel-body">
                      <h3><?php 
        echo Text::read('content.faq.help.title');
        ?>
</h3>
                      <p><?php 
        echo Text::read('content.faq.help.text');
        ?>
 <a href="<?php 
        echo Config::read('page.url.faq');
        ?>
">FAQ</a></p>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          
            <div class="container product-info">
              <div class="row">
              
                <!-- PERGUNTAS -->
                <div class="col-md-8 col-md-offset-2">
                  <div class="productMessages">
                    <h3>Perguntas &amp; Repostas</h3>
                    <div id="messageInfo"></div>
                    <button type="submit" class="newMessage btn btn-primary btn-small btn-block">Iniciar nova discuss&atilde;o</button>
                  </div>
                      
                  <br />
                </div>
                              
                <!-- RESPOSTAS -->
                <div class="col-md-8 col-md-offset-2">
        <?php 
        if (is_array($this->data->messages)) {
            foreach ($this->data->messages as $singleMessage) {
                if (!$singleMessage->parent) {
                    ?>
                  <div class="panel panel-default">
                    <div class="panel-heading">
        <?php 
                    // Permite apenas solicitando da mensagem original ou dono do produto
                    if ($_SESSION['webLogin'] && ($_SESSION['webLogin']->getUserID() == $singleMessage->account || $_SESSION['webLogin']->getUserID() == $this->data->account->id)) {
                        ?>
                      <button class="newMessage pull-right">
                        <input type="hidden" name="messageId" value="<?php 
                        echo $singleMessage->id;
                        ?>
"/>
                        <span class="text"></span><span class="glyphicon glyphicon-circle-arrow-right"></span> Responder
                      </button>
        <?php 
                    }
                    ?>
                      <i class="fa fa-comment"></i> <?php 
                    echo $singleMessage->text;
                    ?>

                      <p><small>&nbsp; &nbsp; <i class="fa fa-user"></i> <?php 
                    echo $singleMessage->accName;
                    ?>
 em <?php 
                    echo $singleMessage->date;
                    ?>
</small></p>
                    </div>
        <?php 
                    foreach ($this->data->messages as $singleAnswer) {
                        if ($singleAnswer->parent == $singleMessage->id) {
                            ?>
                    <div class="panel-body">
                      &nbsp; &nbsp;  <i class="fa fa-comments"></i> <?php 
                            echo $singleAnswer->text;
                            ?>

                      <p><small>&nbsp; &nbsp; &nbsp; &nbsp; <i class="fa fa-user"></i> <?php 
                            echo $singleAnswer->accName;
                            ?>
 em <?php 
                            echo $singleAnswer->date;
                            ?>
</small></p>
                    </div>
        <?php 
                        }
                    }
                    ?>
                  </div>
        <?php 
                }
            }
        }
        ?>
                </div>
              </div>
            </div>

            <!-- MODAL //-->
            <div class="modal fade" id="myAnswerModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4>Perguntas &amp; Repostas</h4>
                        </div>
        
                        <div class="modal-body">
                          <form id="myMessage" method="POST" action="<?php 
        echo Config::read('page.url.product.message') . '/' . $this->data->id;
        ?>
" class="form">
                            <div class="form-group">
                              <label for="inputMessage"></label>
                              <textarea class="form-control" id="inputMessage" placeholder="Deixe sua pergunta aqui"></textarea>
                            </div>

                            <input type="hidden" name="parent" />
                          </form>
                        </div>
                        
                        <div class="modal-footer">
                            <button type="button" id="sendMessage" class="btn btn-primary"><?php 
        echo Text::read('form.send');
        ?>
</button>
                        </div>
                    </div>
                </div>
            </div>
    		<?php 
        return ob_get_clean();
    }
コード例 #22
0
    protected function getContent()
    {
        // Inicializa assistente de formulário
        $form = new Form("myDetail");
        // Prepara formulário de inserção/atualização de dados
        $dataArr['ajax'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => true]];
        $dataArr['id'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => $this->data->id]];
        $dataArr['name'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->name, "text" => Text::read('form.name'), "length" => 60]];
        $detailForm = $form->createFormFields($dataArr);
        unset($dataArr);
        $dataArr['email'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->email, "text" => Text::read('form.email'), "length" => 40]];
        $dataArr['password'] = ["type" => Config::read('form.password'), "data" => (object) ["value" => $this->data->password, "text" => Text::read('form.password'), "length" => 20, "help" => Text::read('form.password.help')]];
        $securityForm = $form->createFormFields($dataArr);
        unset($dataArr);
        $dataArr['blocked'] = ["type" => Config::read('form.checkbox'), "data" => (object) ["value" => true, "text" => Text::read('form.block.user'), "checked" => $this->data->blocked]];
        $accessForm = $form->createFormFields($dataArr);
        unset($dataArr);
        ob_start();
        ?>
			<fieldset>
			  <legend><span class="glyphicon glyphicon-th-list"></span> <?php 
        echo Text::read('form.detail');
        ?>
</legend>
			  <?php 
        echo $detailForm;
        ?>
			</fieldset>
			
			<fieldset>
			  <legend><span class="glyphicon glyphicon-lock"></span> <?php 
        echo Text::read('form.security');
        ?>
</legend>
			  <?php 
        echo $securityForm;
        ?>
			</fieldset>
		<?php 
        if ($controlAccess) {
            ?>
			<fieldset>
			  <legend><span class="glyphicon glyphicon-wrench"></span> <?php 
            echo Text::read('form.access');
            ?>
</legend>
			  <?php 
            echo $accessForm;
            ?>
			</fieldset>
		<?php 
        } else {
            ?>
			<?php 
            echo $accessForm;
            ?>
		<?php 
        }
        $globalForm = ob_get_clean();
        $dataArr['btnSave'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.save'), "class" => "success", "icon" => "glyphicon-floppy-disk"]];
        $detailForm = $form->createForm($dataArr, $globalForm);
        unset($dataArr);
        ob_start();
        ?>
			<div class="panel panel-primary">
			  <div class="panel-body">
				<?php 
        echo $detailForm;
        ?>
				  
			  </div>
			</div>
		<?php 
        return ob_get_clean();
    }
コード例 #23
0
ファイル: class.Product.php プロジェクト: sohflp/Hooked
 protected function ajaxCallbackForNewFeature()
 {
     // Executa validações dos campos no Formulário
     $validation = $this->executeFormValidation();
     if ($validation['error']) {
         // Mensagem de erro devido a validação de campos
         $json['message'] = Text::alertMessage("danger", Text::read('message.error'));
     } else {
         // // Atualiza / Insere na base de dados
         // if( $this->myView->data->id ){
         //     $this->myModel->update( $this->myView->data );
         // }else{
         // Retorna novo ID para o formulário web
         $json['newFeatureID'] = $this->myModel->insert($this->myView->data);
         // }
         // Recupera mensagens de erro
         if ($this->myModel->getMessage()) {
             $json['message'] = $this->myModel->getMessage();
             if ($this->myModel->getTechnicalMessage()) {
                 $json['message'] = "<a id='ajaxErrorDetail' href='#'>" . $json['message'] . "</a>";
                 $json['technical'] = $this->myModel->getTechnicalMessage();
             }
         }
     }
     // Recupera mensagens de erro individuais e envia para JSON
     $json['validation'] = $validation['messages'];
     return $json;
 }
コード例 #24
0
ファイル: class.OrderBuyView.php プロジェクト: sohflp/Hooked
    protected function getContent()
    {
        // Inicializa assistente de formulário
        $form = new Form("myDetail");
        if (!$this->data->status) {
            $this->data->statusText = Text::read('product.status')['new'];
        }
        // Prepara formulário de inserção/atualização de dados
        $dataArr['ajax'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => true]];
        $dataArr['id'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => $this->data->id]];
        $productForm = $form->createFormFields($dataArr);
        unset($dataArr);
        $dataArr['shipping'] = ["type" => Config::read('form.radio'), "data" => (object) ["value" => Config::read('combo.shipping'), "text" => Text::read('form.shipping'), "checked" => 1]];
        $shippingForm = $form->createFormFields($dataArr);
        unset($dataArr);
        ob_start();
        ?>
            <fieldset>
                <legend><span class="glyphicon glyphicon-th-list"></span> <?php 
        echo Text::read('form.product');
        ?>
</legend>

                <div class="row">
                  <div class="col-md-4 text-center">
            <?php 
        if ($this->data->photos[0]) {
            ?>
                            <img style="width:200px;" src="<?php 
            echo Config::read('url.photos') . '/' . $this->data->album . '/small-' . $this->data->photos[0]->url;
            ?>
" draggable="false">
            <?php 
        }
        ?>
                </div>
                <div class="col-md-6">
                    <h4><?php 
        echo $this->data->name;
        ?>
</h4>
                    <p><?php 
        echo $this->data->text;
        ?>
</p>
                </div>
              </div>
            </fieldset>

            <br />

            <?php 
        echo $productForm;
        ?>

            <fieldset>
              <legend><span class="glyphicon glyphicon-home"></span> <?php 
        echo Text::read('form.shipping.address');
        ?>
</legend>
              <div id="addressCard" class="col-md-6">
                <?php 
        echo OrderDetailView::prepareAddressCard($this->data);
        ?>
              </div>

              <div class="col-md-6">
                <a id="newAddress" class="btn btn-lg btn-info pull-right" href="#">+ Novo endere&ccedil;o de entrega</a>
              </div>
            </fieldset>

            <br />

            <fieldset>
              <legend><span class="glyphicon glyphicon-piggy-bank"></span> <?php 
        echo Text::read('form.price');
        ?>
</legend>
              
              <div class="col-md-4">
                <?php 
        echo $shippingForm;
        ?>
              </div>

              <div class="col-md-4">
                <div class="row">
                  <div class="col-md-6"><b>Valor:</b></div>
                  <div class="col-md-6">R$ <?php 
        echo $this->data->price;
        ?>
</div>
                </div>

                <div class="row">
                  <div class="col-md-6"><b>(-) Desconto:</b></div>
                  <div class="col-md-6">R$ <?php 
        echo $this->data->discount;
        ?>
</div>
                </div>

                <div class="row">
                  <div class="col-md-6"><b>(+) Frete:</b></div>
                  <div class="col-md-6">R$ 0,00</div>
                </div>

                <p>________________________________</p>

                <div class="row">
                  <div class="col-md-6"><b>TOTAL:</b></div>
                  <div class="col-md-6">R$ <?php 
        echo $this->data->price - $this->data->discount;
        ?>
</div>
                </div>
              </div>
            </fieldset>

            <br />
        <?php 
        $globalForm = ob_get_clean();
        $dataArr['btnPay'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.save'), "class" => "success btn-lg", "icon" => "glyphicon-floppy-disk"]];
        $detailForm = $form->createForm($dataArr, $globalForm);
        unset($dataArr);
        ob_start();
        ?>
            <!-- STATUS //-->
            <div class="row">
               <div class="col-md-8 col-md-offset-2">

                     <div class="stepwizard">
                        <div class="stepwizard-row setup-panel">
                            <div class="stepwizard-step">
                                <a href="#step-1" type="button" class="btn btn-primary btn-circle">1</a>
                                <p>Dados de Entrega</p>
                            </div>
                            <div class="stepwizard-step">
                                <a href="#step-2" type="button" class="btn btn-default btn-circle" disabled="disabled">2</a>
                                <p>Pagamento</p>
                            </div>
                            <div class="stepwizard-step">
                                <a href="#step-3" type="button" class="btn btn-default btn-circle" disabled="disabled">3</a>
                                <p>Conclus&atilde;o do Pedido</p>
                            </div>
                        </div>
                    </div>

               </div>
            </div>

            <div class="container">
              <div class="row cadastro">
                <div class="col-md-8 col-md-offset-2">
                  <?php 
        echo $detailForm;
        ?>
                </div>
              </div>
            </div>

            <!-- MODAL //-->
            <div class="modal fade" id="myShippingAddressModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4><?php 
        echo Text::read('form.shipping.address');
        ?>
</h4>
                        </div>
        
                        <div class="modal-body">
                          <form id="myShippingAddress" method="POST" action="<?php 
        echo Config::read('page.url.order.shipping.address');
        ?>
" class="form">
                            <?php 
        echo $this->addressView->getContent();
        ?>
                          </form>
                        </div>
                        
                        <div class="modal-footer">
                            <button type="button" id="sendShippingAddress" class="btn btn-primary"><?php 
        echo Text::read('form.save');
        ?>
</button>
                        </div>
                    </div>
                </div>
            </div>
    		<?php 
        return ob_get_clean();
    }
コード例 #25
0
ファイル: trait.WebView.php プロジェクト: sohflp/Hooked
    protected function getNavbar()
    {
        // Verifica se o modelo de Tipos de produtos foi declarado
        if (class_exists('ProductTypeModel')) {
            $typeModel = new ProductTypeModel();
            $navbarItems = $typeModel->selectComboType();
            // Seleciona somente primeiro nível de tipos
        }
        ob_start();
        ?>
			<div class="navbar-header">
				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#menu">
					<i class="fa fa-bars"></i>
				</button>
				<a class="navbar-brand" href="<?php 
        echo Config::read('page.url.homepage');
        ?>
">
					<img alt="Hooked" src="<?php 
        echo $this->getTemplateURL();
        ?>
/img/sprite/sprite.png">
				</a>
			</div>

			<div class="collapse navbar-collapse" id="menu">
				<ul class="nav navbar-nav">
        <?php 
        if ($navbarItems) {
            foreach ($navbarItems as $item) {
                ?>
					<li><a href="<?php 
                echo Config::read('page.url.product.type') . '/' . $item->id;
                ?>
"><?php 
                echo $item->text;
                ?>
</a></li>
        <?php 
            }
        }
        ?>
					<li>
						<a href="#" class="btn-search">
							<div class="fa fa-search"></div>
						</a>
					</li>
				</ul>

				<ul class="nav navbar-nav navbar-right">
					<li><a href="<?php 
        echo Config::read('page.url.faq');
        ?>
"><i class="fa fa-comment"></i> <span class="hidden-xs">FAQ</span></a></li>
        <?php 
        // Verifica se o usuário está logado no sistema
        if ($_SESSION['webLogin'] && $_SESSION['webLogin']->getUserID()) {
            // Verifica se o modelo de Caixa de Entrada foi declarado
            if (class_exists('InboxModel')) {
                $inboxModel = new InboxModel();
                $filter = new stdclass();
                $filter->account = $_SESSION['webLogin']->getUserID();
                $filter->unread = true;
                $totalMessages = $inboxModel->selectForTotal($filter);
            }
            ?>
        			<li>
        				<a href="<?php 
            echo Config::read('page.url.inbox.search');
            ?>
">
        					<i class="fa fa-inbox"></i> <span class="hidden-xs">Inbox <span class="badge"><?php 
            echo $totalMessages;
            ?>
</span></span>
        				</a>
        			</li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-user"></i> <?php 
            echo $_SESSION['webLogin']->getUserName();
            ?>
 <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a href="<?php 
            echo Config::read('page.url.product.account') . '/' . $_SESSION['webLogin']->getUserID();
            ?>
">Minha Loja</a></li>
                            <li class="divider"></li>
                            <li><a href="<?php 
            echo Config::read('page.url.product.myaccount');
            ?>
">Meus produtos</a></li>
                            <li><a href="<?php 
            echo Config::read('page.url.product.create');
            ?>
">Adicionar produto</a></li>
                            <li class="divider"></li>
                            <li><a href="<?php 
            echo Config::read('page.url.order.mysales');
            ?>
">Minhas vendas</a></li>
                            <li><a href="<?php 
            echo Config::read('page.url.order.mypurchases');
            ?>
">Minhas compras</a></li>
                            <li class="divider"></li>
                            <li><a href="<?php 
            echo Config::read('page.url.login.myaccount');
            ?>
">Meus dados</a></li>
                            <li class="divider"></li>
                            <li><a href="<?php 
            echo Config::read('page.url.login.logoff');
            ?>
"><?php 
            echo Text::read('menu.logoff');
            ?>
</a></li>
                        </ul>
                    </li>
        <?php 
        } else {
            ?>
                    <li><a href="<?php 
            echo Config::read('page.url.login');
            ?>
">Faça o login</a></li>
        <?php 
        }
        ?>
				</ul>
			</div>

			<div class="search-input search-input-slide">
				<form method="POST" id="search-form" role="search" action="<?php 
        echo Config::read('page.url.product.search');
        ?>
">
                    <input name="name" autocomplete="off" autocorrect="off" id="search-input" placeholder="Pesquise por marcas ou produtos" type="text">
					<div class="close">&times;</div>
				</form>
			</div>
		<?php 
        return ob_get_clean();
    }
コード例 #26
0
    protected function getContent()
    {
        // Inicializa assistente de formulário
        $form = new Form("myDetail");
        $dataArr['ajax'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => true]];
        $dataArr['id'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => $this->data->id]];
        $dataArr['full'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => true]];
        $dataArr['name'] = ["type" => Config::read('form.input'), "data" => (object) ["text" => Text::read('form.name'), "value" => $this->data->name, "length" => 50]];
        $dataArr['surname'] = ["type" => Config::read('form.input'), "data" => (object) ["text" => Text::read('form.surname'), "value" => $this->data->surname, "length" => 50]];
        $dataArr['sex'] = ["type" => Config::read('form.radio'), "data" => (object) ["text" => Text::read('form.sex'), "value" => [(object) ["id" => 1, "text" => Text::read('form.man')], (object) ["id" => 2, "text" => Text::read('form.woman')]], "checked" => $this->data->sex]];
        $dataArr['cpf'] = ["type" => Config::read('form.input'), "data" => (object) ["text" => Text::read('form.cpf'), "value" => $this->data->cpf, "length" => 14]];
        $accountForm = $form->createFormFields($dataArr);
        unset($dataArr);
        $dataArr['phone'] = ["type" => Config::read('form.input'), "data" => (object) ["text" => Text::read('form.phone'), "value" => $this->data->phone, "length" => 20]];
        $dataArr['cellphone'] = ["type" => Config::read('form.input'), "data" => (object) ["text" => Text::read('form.cellphone'), "value" => $this->data->cellphone, "length" => 20]];
        $dataArr['news'] = ["type" => Config::read('form.checkbox'), "data" => (object) ["text" => Text::read('form.newsletter'), "checked" => $this->data->news]];
        $contactForm = $form->createFormFields($dataArr);
        unset($dataArr);
        $dataArr['email'] = ["type" => Config::read('form.input'), "data" => (object) ["text" => Text::read('form.email'), "value" => $this->data->email, "disabled" => true]];
        $dataArr['password'] = ["type" => Config::read('form.password'), "data" => (object) ["text" => Text::read('form.password'), "length" => 20]];
        $securityForm = $form->createFormFields($dataArr);
        unset($dataArr);
        ob_start();
        ?>
			<fieldset>
				<legend><span class="glyphicon glyphicon-camera"></span> <?php 
        echo Text::read('form.photo');
        ?>
</legend>
				<?php 
        echo $this->photoView->getContent();
        ?>
			</fieldset>

			<br />

			<fieldset>
				<legend><span class="glyphicon glyphicon-th-list"></span> <?php 
        echo Text::read('form.personal');
        ?>
</legend>
				<?php 
        echo $accountForm;
        ?>
			</fieldset>

			<br />

			<fieldset>
				<legend><span class="glyphicon glyphicon-lock"></span> <?php 
        echo Text::read('form.contact');
        ?>
</legend>
				<?php 
        echo $contactForm;
        ?>
			</fieldset>

			<br />

			<fieldset>
				<legend><span class="glyphicon glyphicon-home"></span> <?php 
        echo Text::read('form.address');
        ?>
</legend>
				<?php 
        echo $this->addressView->getContent();
        ?>
			</fieldset>

			<br />

			<fieldset>
				<legend><span class="glyphicon glyphicon-lock"></span> <?php 
        echo Text::read('form.security');
        ?>
</legend>
				<?php 
        echo $securityForm;
        ?>
			</fieldset>
		<?php 
        $globalForm = ob_get_clean();
        $dataArr['btnSave'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.save'), "class" => "success btn-lg"]];
        $accountForm = $form->createForm($dataArr, $globalForm);
        unset($dataArr);
        ob_start();
        ?>
			<div class="container">
				<div class="row cadastro">
					<div class="col-md-8 col-md-offset-2">
						<?php 
        echo $accountForm;
        ?>
					</div>
				</div>
			</div>
		<?php 
        return ob_get_clean();
    }
コード例 #27
0
ファイル: class.Error.php プロジェクト: sohflp/Hooked
    protected function getNavbar()
    {
        ob_start();
        ?>
			<div class="navbar-header">
              <a class="navbar-brand" href="<?php 
        echo Config::read('page.url.homepage');
        ?>
/" style="padding: 10px;">
                <img alt="<?php 
        echo Text::read('title');
        ?>
" src="<?php 
        echo $this->getTemplateURL();
        ?>
/img/logo.png" />
              </a>
			</div>
		<?php 
        return ob_get_clean();
    }
コード例 #28
0
    public static function prepareAddressCard($address)
    {
        ob_start();
        ?>
            <div>
              <b><?php 
        echo Text::read('form.street');
        ?>
</b>: <?php 
        echo $address->street;
        ?>
, <?php 
        echo $address->number;
        ?>
 <?php 
        echo $address->complement;
        ?>
            </div>

            <div>
              <b><?php 
        echo Text::read('form.local');
        ?>
</b>: <?php 
        echo $address->local;
        ?>
            </div>

            <div>
              <b><?php 
        echo Text::read('form.city');
        ?>
</b>: <?php 
        echo $address->city;
        ?>
 - <?php 
        echo $address->state;
        ?>
            </div>

            <div>
              <b><?php 
        echo Text::read('form.zipcode');
        ?>
</b>: <?php 
        echo $address->zipcode;
        ?>
            </div>
        <?php 
        return ob_get_clean();
    }
コード例 #29
0
ファイル: class.Order.php プロジェクト: sohflp/Hooked
 protected function ajaxCallbackForShippingAddress()
 {
     // Executa validações dos campos no Formulário
     $validation = $this->executeAddressFormValidation();
     if ($validation['error']) {
         // Mensagem de erro devido a validação de campos
         $json['message']['type'] = "error";
         $json['message']['text'] = Text::read('message.error');
     } else {
         $json['message']['type'] = "success";
         $json['message']['text'] = "Endere&ccedil;o de entrega atualizado";
         $json['addressDetail'] = OrderDetailView::prepareAddressCard($this->myView->data);
     }
     // Recupera mensagens de erro individuais e envia para JSON
     $json['validation'] = $validation['messages'];
     return $json;
 }
コード例 #30
0
ファイル: class.ProductModel.php プロジェクト: sohflp/Hooked
 public function delete($id)
 {
     $data = $this->selectForDetail($id);
     $this->mapping->criterias['id'] = new stdclass();
     $this->mapping->criterias['id']->field = 'productID';
     $this->mapping->criterias['id']->operator = '=';
     $this->mapping->criterias['id']->value = $id;
     try {
         $this->dbh->beginTransaction();
         parent::delete($id);
         $this->dbh->commit();
         // Elimina álbum de fotos
         $this->albumModel->delete($data->album);
     } catch (PDOException $exception) {
         $this->dbh->rollback();
         $this->modelException(Text::read('message.model.error.delete'), $exception);
     }
 }