Beispiel #1
0
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">
							<div class="links">
Beispiel #2
0
<?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';
$actScript = 'pso_portfolio.php';
globalizePost();
$obj = new pso_portfolio();
$title = getTitleFromMenuCaption('Portfolio');
/**
 * Delete Record
 */
if (!$_SESSION['REDO']) {
    if ($po_id) {
        $po_ids = split('__', $po_id);
        foreach ($po_ids as $po_id) {
            $_REQUEST['po_id'] = $po_id;
            $obj->DeleteRequest(false);
        }
    }
}
unset($_SESSION['REDO']);
?>
<!DOCTYPE html>
				<html lang="en">
				<head><title>PSO | Dashboard</title>
				    <meta charset="utf-8">
				    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
				    <meta name="viewport" content="width=device-width, initial-scale=1.0">
				    <link rel="shortcut icon" href="images/icons/favicon.ico">
Beispiel #3
0
include_once CLASS_PATH . 'pso_portfolio.class.php';
include_once CLASS_PATH . 'pso_portfolio_cat.class.php';
/**
 * Add SESSION variable to prevent main form to REDO the delete action
 */
$_SESSION['REDO'] = true;
/**
 * Errors Management
 */
if ($_GET['error'] == 1) {
    $notification = formatFormErrors($_SESSION['errorMsgs']);
}
$actScript = 'pso_portfolio.form.php';
globalizeGet();
globalizePost();
$obj = new pso_portfolio();
$title = getTitleFromMenuCaption('Portfolio');
//  Update number values
//  Remove the thousands seperator
$_REQUEST['po_id'] = str_replace(".", "", $_REQUEST['po_id']);
$_REQUEST['po_id'] = str_replace(",", ".", $_REQUEST['po_id']);
$_REQUEST['po_pocat_id'] = str_replace(".", "", $_REQUEST['po_pocat_id']);
$_REQUEST['po_pocat_id'] = str_replace(",", ".", $_REQUEST['po_pocat_id']);
$_REQUEST['po_published'] = str_replace(".", "", $_REQUEST['po_published']);
$_REQUEST['po_published'] = str_replace(",", ".", $_REQUEST['po_published']);
//  Set value of checkbox = 0 if not passed in the request
$_REQUEST['po_published'] = isset($_REQUEST['po_published']) && $_REQUEST['po_published'] == "on" ? 1 : 0;
switch ($in2Action) {
    case 'add':
        $_REQUEST['po_cruser'] = $_SESSION['us_id'];
        $_REQUEST['po_crdate'] = $_SESSION['us_id'];
<?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>&nbsp;Edit</button>
											<button type="button" class="btn btn-default" onclick="javascript:deleteRecord(\'po_id\', ' . $row->po_id . ');"><i class="fa fa-trash-o"></i>&nbsp;Delete</button>
										</div>
									</td>';
    print '</tr>';
}