public function download($id = '') { if ($id == '') { $this->index(); } DownloadData::IncrementDLCount($id); $this->set('download', DownloadData::GetAsset($id)); $this->render('download_item.tpl'); }
?> " href="<?php echo adminaction('/downloads'); ?> ">Delete</button> <button id="dialog" class="jqModal button {button:{icons:{primary:'ui-icon-circle-plus'}}}" href="<?php echo adminaction('/downloads/adddownload?cat=' . $category->id); ?> ">Add Download</button> </span> </h3> <?php $alldownloads = DownloadData::getDownloads($category->id); if (!$alldownloads) { echo 'There are no downloads under this category.'; } else { ?> <table id="tabledlist" class="tablesorter"> <thead> <tr> <th>Download Name</th> <th>Description</th> <th align="center">Download Count</th> <th>Options</th> </tr> </thead> <tbody> <?php
protected function DeleteDownloadPost() { $params = array(); if ($this->post->id == '') { $params['status'] = 'Invalid Download ID'; echo json_encode($params); return; } DownloadData::RemoveAsset($this->post->id); $params['status'] = 'ok'; echo json_encode($params); return; }