public static function createDir() { // auto crate folders // $thePath = publisherGetUploadDir(); if (publisherGetPathStatus('root', true) < 0) { $thePath = publisherGetUploadDir(); $res = publisherMkdir($thePath); $msg = $res ? _AM_PUBLISHER_DIRCREATED : _AM_PUBLISHER_DIRNOTCREATED; } if (publisherGetPathStatus('images', true) < 0) { $thePath = publisherGetImageDir(); $res = publisherMkdir($thePath); if ($res) { $source = PUBLISHER_ROOT_PATH . '/assets/images/blank.png'; $dest = $thePath . 'blank.png'; publisherCopyr($source, $dest); } $msg = $res ? _AM_PUBLISHER_DIRCREATED : _AM_PUBLISHER_DIRNOTCREATED; } if (publisherGetPathStatus('images/category', true) < 0) { $thePath = publisherGetImageDir('category'); $res = publisherMkdir($thePath); if ($res) { $source = PUBLISHER_ROOT_PATH . '/assets/images/blank.png'; $dest = $thePath . 'blank.png'; publisherCopyr($source, $dest); } $msg = $res ? _AM_PUBLISHER_DIRCREATED : _AM_PUBLISHER_DIRNOTCREATED; } if (publisherGetPathStatus('images/item', true) < 0) { $thePath = publisherGetImageDir('item'); $res = publisherMkdir($thePath); if ($res) { $source = PUBLISHER_ROOT_PATH . '/assets/images/blank.png'; $dest = $thePath . 'blank.png'; publisherCopyr($source, $dest); } $msg = $res ? _AM_PUBLISHER_DIRCREATED : _AM_PUBLISHER_DIRNOTCREATED; } if (publisherGetPathStatus('content', true) < 0) { $thePath = publisherGetUploadDir(true, 'content'); $res = publisherMkdir($thePath); $msg = $res ? _AM_PUBLISHER_DIRCREATED : _AM_PUBLISHER_DIRNOTCREATED; } }
publisherCpHeader(); //publisher_adminMenu(0, _AM_PUBLISHER_INDEX); // Total ITEMs -- includes everything on the table $totalitems =& $publisher->getHandler('item')->getItemsCount(); // Total categories $totalcategories =& $publisher->getHandler('category')->getCategoriesCount(-1); // Total submitted ITEMs $totalsubmitted =& $publisher->getHandler('item')->getItemsCount(-1, array(PublisherConstants::PUBLISHER_STATUS_SUBMITTED)); // Total published ITEMs $totalpublished =& $publisher->getHandler('item')->getItemsCount(-1, array(PublisherConstants::PUBLISHER_STATUS_PUBLISHED)); // Total offline ITEMs $totaloffline =& $publisher->getHandler('item')->getItemsCount(-1, array(PublisherConstants::PUBLISHER_STATUS_OFFLINE)); // Total rejected $totalrejected =& $publisher->getHandler('item')->getItemsCount(-1, array(PublisherConstants::PUBLISHER_STATUS_REJECTED)); // Check Path Configuration if (publisherGetPathStatus('root', true) < 0 || publisherGetPathStatus('images', true) < 0 || publisherGetPathStatus('images/category', true) < 0 || publisherGetPathStatus('images/item', true) < 0 || publisherGetPathStatus('content', true) < 0) { PublisherUtilities::createDir(); } publisherOpenCollapsableBar('inventorytable', 'inventoryicon', _AM_PUBLISHER_INVENTORY); echo '<br />'; echo "<table width='100%' class='outer' cellspacing='1' cellpadding='3' border='0' ><tr>"; echo "<td class='head'>" . _AM_PUBLISHER_TOTALCAT . "</td><td align='center' class='even'>" . $totalcategories . '</td>'; echo "<td class='head'>" . _AM_PUBLISHER_TOTALSUBMITTED . "</td><td align='center' class='even'>" . $totalsubmitted . '</td>'; echo "<td class='head'>" . _AM_PUBLISHER_TOTALPUBLISHED . "</td><td align='center' class='even'>" . $totalpublished . '</td>'; echo "<td class='head'>" . _AM_PUBLISHER_TOTAL_OFFLINE . "</td><td align='center' class='even'>" . $totaloffline . '</td>'; echo '</tr></table>'; echo '<br />'; echo "<form><div style=\"margin-bottom: 12px;\">"; echo "<input type='button' name='button' onclick=\"location='category.php?op=mod'\" value='" . _AM_PUBLISHER_CATEGORY_CREATE . "'> "; echo "<input type='button' name='button' onclick=\"location='item.php?op=mod'\" value='" . _AM_PUBLISHER_CREATEITEM . "'> "; echo '</div></form>';