<?php include_once "administration/conf/config.server.php"; 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">
<?php include_once 'conf/config.php'; include_once 'lang/pso_portfolio_cat.lang.inc'; include_once CLASS_PATH . 'pso_portfolio_cat.class.php'; globalizePost(); $obj = new pso_portfolio_cat(); $rows = MAX_PAGE_RECORDS; /** * Get query data */ $obj->Select(array('pocat_title', 'pocat_order', 'IF(pocat_published = 1, "' . $yesNo[$_SESSION['lang']][1] . '", "' . $yesNo[$_SESSION['lang']][0] . '") pocat_published', 'pocat_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->pocat_id . '" value="' . $row->pocat_id . '"/> </td>'; print ' <td>' . $row->pocat_title . '</td>'; print ' <td>' . $row->pocat_order . '</td>'; print ' <td>' . $row->pocat_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_cat.form.php?recordId=' . $row->pocat_id . '&in2Action=editRecord\');"><i class="fa fa-edit"></i> Edit</button> <button type="button" class="btn btn-default" onclick="javascript:deleteRecord(\'pocat_id\', ' . $row->pocat_id . ');"><i class="fa fa-trash-o"></i> Delete</button> </div> </td>'; print '</tr>'; }