function buildAttachmentsArray($attachments) { $attachment_array = array(); foreach ($attachments as $attachment) { if ($attachment->category_id == 'ContractAttachment') { $is_default = 1; } else { $is_default = 0; } $rev_number = $attachment->revision ? '_rev.' . $attachment->revision : ''; $rev_id = $attachment->doc_rev_id ? $attachment->doc_rev_id : $attachment->document_revision_id; $attachment_array[] = array('document_name' => from_html($attachment->document_name) . $rev_number, 'document_revision_id' => $rev_id, 'file_url' => downloadLink($rev_id), 'id' => $attachment->id, 'is_default' => $is_default); } return $attachment_array; }
function drawRemoteModules($modules) { global $strings; echo "<table>"; echo "<tr><th>" . $strings["modules-table-name"] . "</th><span></span><th>" . $strings["modules-table-version"] . "</th><th>" . $strings["modules-table-author"] . "</th><th>" . $strings["modules-table-description"] . "</th><th>" . $strings["modules-table-size"] . "</th><th>" . $strings["modules-table-action"] . "</th></tr>"; foreach ($modules as $module) { if ($module != "") { $module = explode("|", $module); echo "<tr><td>{$module['0']}</td><td>{$module['1']}</td><td>{$module['2']}</td><td>{$module['3']}</td><td>{$module['4']}K</td><td align=right>" . downloadLink($module) . "</td></tr>\n"; } } echo "</table>"; }
include $dir . 'include/functions.php'; include $dir . 'include/mysql.php'; include $dir . 'include/class.phpmailer.php'; include $dir . 'include/class.smtp.php'; include $dir . 'include/config.php'; include $dir . 'include/spmSettings.php'; $helpImg = $dir . 'images/admin/help.png'; $delImg = $dir . 'images/admin/delete.png'; $tinyMCE = $dir . 'admin/tinymce/jscripts/tiny_mce/tiny_mce.js'; $bootDir = $dir . 'include/bootstrap/'; $srcDir = $dir . 'include/'; $devSite = true; if ($_POST['dl']) { //download files $url = $_POST['url']; downloadLink($url); exit; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title><?php echo $businessName; ?> Admin Area</title> <link href="<?php echo $dir; ?> include/css/admin.css" rel="stylesheet" /> <script src="<?php
$dir = '../'; include $dir . 'include/mysql.php'; include $dir . 'include/config.php'; include $dir . 'include/functions.php'; include $dir . 'include/spmSettings.php'; session_start(); if (is_int(strpos(__FILE__, 'C:\\'))) { //localhost error_reporting(E_ALL ^ E_NOTICE); } else { //live website error_reporting(0); } if ($_POST['dl']) { downloadLink($_POST['url']); } $templateHeader = $val['memHeader']; $templateFooter = $val['memFooter']; $membersContent = $val['memAreaContent']; if ($_POST['login']) { //verify username/password $username = trim($_POST['username']); $password = trim($_POST['password']); if (empty($username)) { $_SESSION['error'] = 'Please enter a valid username!'; } if (empty($password)) { $_SESSION['error'] = 'Please enter a valid password!'; } $selU = 'SELECT * FROM users where USERNAME="******" || email="' . $username . '"';