function showTemplates($start_record, $end_record, $category_id = NULL) { $db = Database::obtain(); if ($category_id == NULL) { $filter = ''; } else { $filter = 'WHERE `template_category` = ' . $db->escape($category_id); } $sql = "SELECT * FROM `" . TABLE_TEMPLATES . "`\n\t\t\t\t" . $filter . "\n\t\t\t\tORDER BY name ASC\n\t\t\t\tLIMIT " . $start_record . "," . $end_record . ""; $templates = $db->fetch_array($sql); $templateList = array(); foreach ($templates as $template) { $templateList[] = $template['name']; if ($template['id'] == $website_template) { $website_template = $template['name']; } } $form = '<table cellspacing="10" border="0" align="center"><tr>'; foreach ($templateList as $i => $t) { $form .= '<td align="center">'; if ($t == $website_template) { $form .= $t . '<br><img src="templates/' . $t . '/preview.jpg" width="150px" height="100px"><br>' . MSG00092 . ' <input name="website_template" value="' . $t . '" type="radio" checked="checked" /><br/>'; } else { $form .= $t . '<br><img src="templates/' . $t . '/preview.jpg" width="150px" height="100px"><br>' . MSG00092 . ' <input name="website_template" value="' . $t . '" type="radio" /><br />'; } $form .= '</td>'; if (($i + 1) % 4 == 0) { $form .= '<tr></tr>'; } } $form .= '</tr></table>'; $form .= linkButton(scriptName() . '?website&edit=' . $website_id . '&settings', MSG00089); echo $form; }
function itemsPerPageLinks() { $data = '<font style="float:right; font-size:11px;"> [<a href="' . scriptName() . '?' . $_SERVER['QUERY_STRING'] . '&items_per_page=15">15</a>] [<a href="' . scriptName() . '?' . $_SERVER['QUERY_STRING'] . '&items_per_page=25">25</a>] [<a href="' . scriptName() . '?' . $_SERVER['QUERY_STRING'] . '&items_per_page=50">50</a>] [<a href="' . scriptName() . '?' . $_SERVER['QUERY_STRING'] . '&items_per_page=75">75</a>] [<a href="' . scriptName() . '?' . $_SERVER['QUERY_STRING'] . '&items_per_page=100">100</a>] [<a href="' . scriptName() . '?' . $_SERVER['QUERY_STRING'] . '&items_per_page=150">150</a>] [<a href="' . scriptName() . '?' . $_SERVER['QUERY_STRING'] . '&items_per_page=200">200</a>] ' . helpIcon(MSG00052) . '</font>'; return $data; }
</td> <td colspan="2" rowspan="1" style="text-align:center; font-weight:bold; background-color:#A3A3A3;"> <?php if (isAdmin($_SESSION['userid'])) { echo $fullnames . ' <a href="admin.php?admp=users&edit=' . $userid . '">' . icon('edit') . '</a> ' . helpIcon(MSG00224); if (helpEnabled($userid)) { echo ' <a href="' . scriptName() . '?user=hidehelp">' . icon('hide_help', '20px') . '</a> <font style="font-size:10px;font-weight:normal;"><-- ' . MSG00225 . '</font>'; } else { echo ' <a href="' . scriptName() . '?user=showhelp">' . icon('show_help', '20px') . '</a>'; } } else { echo $fullnames . ' <a href="' . scriptName() . '?user=edit">' . icon('edit') . '</a> ' . helpIcon(MSG00224); if (helpEnabled($userid)) { echo ' <a href="' . scriptName() . '?user=hidehelp">' . icon('hide_help', '20px') . '</a> <font style="font-size:10px;font-weight:normal;"><-- ' . MSG00225 . '</font>'; } else { echo ' <a href="' . scriptName() . '?user=showhelp">' . icon('show_help', '20px') . '</a>'; } } ?> </td> </tr> <tr style="background-color:#D6D6D6;"> <td width="140px" style="font-weight:bold; text-align:right;"> <?php echo MSG00202; ?> : </td> <td> U53R<?php echo $userid . ' ' . helpIcon(MSG00226);
// * This program is distributed in the hope that it will be useful, * // * but WITHOUT ANY WARRANTY; without even the implied warranty of * // * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * // * GNU General Public License for more details. * // * * // * You should have received a copy of the GNU General Public License * // * along with this program. If not, see <http://www.gnu.org/licenses/>. * // * * // ************************************************************************* if (!isset($_SESSION['userid'])) { header("Location: ../index.php"); } if (isAdmin($_SESSION['userid'])) { echo '<form action="admin.php?admp=users&action=edit&save=' . $userid . '" method="post">'; } else { echo '<form action="' . scriptName() . '?user=save" method="post">'; } ?> <table width="100%" cellpadding="5px" cellspacing="1px" border="0" style="font-size: 14px; margin-left:auto; margin-right:auto; background-color:#8A8A8A;"> <tbody> <tr> <td colspan="2" rowspan="5" width="40%" style="vertical-align: middle; text-align:center; background-color:white;"> <?php echo icon('userimage', '130px'); ?> </td> <td colspan="2" rowspan="1" style="text-align:center; font-weight:bold; background-color:#A3A3A3;"> <?php echo MSG00156; ?> : <input type="text" name="fullnames" value="<?php
function showUserInfo($userid) { $db = Database::obtain(); $sql = "SELECT * FROM " . TABLE_USERS . "\n\t\t\t\t\tWHERE `id` =" . $userid . ""; $userdata = $db->query_first($sql); $userid = $userdata['id']; $username = $userdata['username']; $maxwebsites = $userdata['maxwebsites']; $fullnames = $userdata['fullnames']; $phone = $userdata['phone']; $user_website = $userdata['user_website']; $email = $userdata['email']; if (isset($_SESSION['last_visit'])) { $last_visit = $_SESSION['last_visit']; } else { $last_visit = $userdata['last_visit']; } $register_date = $userdata['joined']; $status = getAccountStatus($userdata['account_active']); $group = getGroup($userdata['group']); $date = getAccountExpireDate($userid); // date_add($date, date_interval_create_from_date_string('90 days')); //only available in PHP 5.3.0 date_modify($date, '+ 90 days'); $renewdate = date_format($date, 'Y-m-d'); $userlanguage = showUserLanguage($userdata['language']); $profilemsg = file_get_contents('pages/profile_message.php'); $statuslink = ''; if ($userdata['account_active'] == '0') { if (scriptName() == 'admin.php') { $adml = '&user='******''; } if (isUser($userid)) { $statuslink = ' - ' . textLink(scriptName() . '?activate' . $adml, MSG00151) . helpIcon(MSG00152); } else { $statuslink = ' - ' . textLink(scriptName() . '?activate' . $adml, MSG00151) . helpIcon(MSG00150); } } elseif ($userdata['account_active'] == '3') { $statuslink = ' - ' . textLink('mailto:' . szEmail(), MSG00149); } include_once 'views/profile_view.php'; }