include_once CLASS_PATH . 'pso_portfolio_cat.class.php'; include_once CLASS_PATH . 'pso_portfolio.class.php'; /* Portfolio Cat*/ $objPorCat = new pso_portfolio_cat(); $whereClausePorCat = 'WHERE pocat_published=1 ORDER BY pocat_order ASC'; $objPorCat->Select(array('pocat_title', 'pocat_id', 'pocat_order', 'pocat_published'), '', $whereClausePorCat, '', false); $printPorCat = ''; $printPortfolio = ''; while (!$objPorCat->EOF()) { $rowPorCat = $objPorCat->Row(); $printPorCat .= '<button class="btn btn-portfolio-filter btn-white btn-active-primary" data-filter=".cat-' . $rowPorCat->pocat_id . '">' . $rowPorCat->pocat_title . '</button>'; /* // Portfolio Cat */ /* Portfolio*/ $objPortfolio = new pso_portfolio(); $whereClausePortfolio = 'WHERE po_published=1 AND po_pocat_id=' . $rowPorCat->pocat_id; $objPortfolio->Select(array('po_pocat_id', 'po_id', 'po_title', 'po_link', 'po_desc', 'po_img', 'po_published'), '', $whereClausePortfolio, '', false); while (!$objPortfolio->EOF()) { $rowPortfolio = $objPortfolio->Row(); $PortfolioDesc = strip_tags($rowPortfolio->po_desc); if (strlen($rowPortfolio->po_desc) > 100) { $PortfolioDesc = substr($PortfolioDesc, 0, 100); $PortfolioDesc = explode(' ', $PortfolioDesc); array_pop($PortfolioDesc); $PortfolioDesc = implode(' ', $PortfolioDesc); $PortfolioDesc .= "..."; } $printPortfolio .= '<div class="portfolio-grid-item extended cat-' . $rowPorCat->pocat_id . '"> <div class="portfolio-info"> <div class="links"> <a href="' . PROJECT_UPLOAD_BIG_URL . $rowPortfolio->po_img . '" class="preview"><i class="fa fa-search"></i></a> <a href="#" class="open"><i class="fa fa-external-link"></i></a>
<?php include_once 'conf/config.php'; include_once 'lang/pso_portfolio.lang.inc'; include_once CLASS_PATH . 'pso_portfolio.class.php'; include_once CLASS_PATH . 'pso_portfolio_cat.class.php'; globalizePost(); $obj = new pso_portfolio(); $rows = MAX_PAGE_RECORDS; /** * Get query data */ $obj->Select(array('(SELECT pocat_title FROM pso_portfolio_cat parent WHERE pso_portfolio.po_pocat_id = parent.pocat_id) po_pocat_id', 'po_title', 'po_img', 'IF(po_published = 1, "' . $yesNo[$_SESSION['lang']][1] . '", "' . $yesNo[$_SESSION['lang']][0] . '") po_published', 'po_id'), '', $whereClause . ' ORDER BY ' . ($_POST['sort'] - 2) . ' ' . $_POST['dir'], $_POST['page'], $rows, false); while (!$obj->EOF()) { $row = $obj->Row(); print ' <td> <input type="checkbox" name="chkRecord" id="chkRecord_' . $row->po_id . '" value="' . $row->po_id . '"/> </td>'; print ' <td><img src="' . PROJECT_UPLOAD_BO_URL . $row->po_img . '" class="img-responsive img-circle"/></td>'; print ' <td>' . $row->po_pocat_id . '</td>'; print ' <td>' . $row->po_title . '</td>'; print ' <td>' . $row->po_link . '</td>'; print ' <td>' . $row->po_published . '</td>'; print ' <td> <div class="action-group btn-group pull-right mtm mbm"> <button type="button" class="btn btn-default" onclick="javascript:window.location.assign(\'pso_portfolio.form.php?recordId=' . $row->po_id . '&in2Action=editRecord\');"><i class="fa fa-edit"></i> Edit</button> <button type="button" class="btn btn-default" onclick="javascript:deleteRecord(\'po_id\', ' . $row->po_id . ');"><i class="fa fa-trash-o"></i> Delete</button> </div> </td>'; print '</tr>'; }