Esempio n. 1
0
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;
}
Esempio n. 2
0
function editWebsiteMenu($id)
{
    $menu = getMenu($id);
    $functions = '<div id="builder_menu">
			' . linkButton('menu.php?website=' . $id . '&action=new', MSG00134) . helpIcon(MSG00133) . '
			' . linkButton('menu.php?website=' . $id . '&action=reset', MSG00132) . helpIcon(MSG00131) . '
			<br><br><br>
			<table cellspacing="0" callpadding="0"><tr><td>' . helpIcon(MSG00130) . '</td></tr>';
    foreach ($menu as $mid => $item_name) {
        $mitem = '<tr><td width="18px"><a href="javascript:confirmDelete(\'menu.php?website=' . $id . '&del=' . $mid . '\')">' . icon('delete') . '</a> </td>';
        $mitem .= '<td width="18px"> <a href="menu.php?website=' . $id . '&medit=' . $mid . '">' . icon('edit') . '</a></td>';
        $mitem .= '<td width="18px"><a href="menu.php?website=' . $id . '&up=' . $mid . '">' . icon('up') . '</a> </td>';
        $mitem .= '<td><a href="#">' . underscoreRemove($item_name['title']) . '</a></td>';
        $mitem .= '<td width="18px"><a href="menu.php?website=' . $id . '&down=' . $mid . '">' . icon('down') . '</a></td></tr>';
        $functions .= $mitem;
    }
    $form = linkButton('settings.php?website=' . $id, MSG00129) . helpIcon(MSG00126) . ' ';
    $form .= linkButton('pages.php?website=' . $id, MSG00128) . helpIcon(MSG00127);
    echo $functions . '</table></div><br><br>' . $form;
}
Esempio n. 3
0
:
			</td>
			<td>
				<input type="checkbox" name="website_protect" value="1"<?php 
echo $site_protect;
?>
/><?php 
echo ' ' . helpIcon(MSG00198);
?>
<br>
			</td>
		</tr>
	</table>
	<br><br><br><br><br><br><br><br>
	<span class="button-wrapper">
	<span class="button-l"> </span>
	<span class="button-r"> </span>
		<input class="button" type="submit" value="<?php 
echo MSG00136;
?>
">
	</span> <?php 
echo helpIcon(MSG00199);
?>
	<?php 
echo linkButton('template.php?website=' . $id, MSG00129) . helpIcon(MSG00200);
?>
	<?php 
echo linkButton('menu.php?website=' . $id, MSG00128) . helpIcon(MSG00201);
?>
</form>
Esempio n. 4
0
			<td style="font-weight:bold; text-align:right;">
				' . MSG00211 . ':<br>
			</td>
			<td>
				<input type="password" name="passw1" value="" size="25" maxlength="100" />
			</td>
			<td style="font-weight:bold; text-align:right;">
				' . MSG00212 . ':<br>
			</td>
			<td>
				<input type="password" name="passw2" value="" size="25" maxlength="100" />
			</td>
		</tr>';
} else {
    echo '<input type="hidden" name="passw1"/><input type="hidden" name="passw2"/>';
}
?>
	</tbody>
</table>
	<span class="button-wrapper">
	<span class="button-l"> </span>
	<span class="button-r"> </span>
    	<input class="button" type="submit" value="<?php 
echo MSG00136;
?>
">
	</span>
	<?php 
echo linkButton('szu.php', MSG00213);
?>
</form>
Esempio n. 5
0
function dateList($str, $id)
{
    if ($str == "") {
        echo "No available dates at this time. Please send an email to contact";
    } else {
        $dates = explode(",", $str);
        foreach ($dates as $date) {
            linkButton("?id={$id}&&d={$date}", "{$date}");
            //	echo "<a href=\"changeDate.php?d=$date\">".$date."</a>";
            br();
        }
    }
}
Esempio n. 6
0
function editWebsitePage($siteid, $pageid)
{
    $_SESSION['site'] = $siteid;
    $menu = getMenu($siteid);
    if ($pageid == Null) {
        $pageid = $menu[0]['pageid'];
    }
    $db = Database::obtain();
    $sql = "SELECT * FROM " . TABLE_PAGES . "\n\t\t\t\t\tWHERE `id` =" . $pageid . "";
    $page = $db->fetch_array($sql);
    $body = $page[0]['content'];
    $pagedata = '';
    $pagedata .= helpIcon(MSG00015) . ' ';
    foreach ($menu as $mid => $page) {
        $pagedata .= '<a href="pages.php?website=' . $siteid . '&pages=' . $page['pageid'] . '">' . $page['title'] . '</a> | ';
    }
    $pagedata .= '<div><form action="pages.php?website=' . $siteid . '&pages=' . $pageid . '" method="post">';
    $pagedata .= '<input name="id" type="hidden" value="' . $pageid . '">';
    $pagedata .= '<textarea id="TextAreaData" name="TextAreaData">';
    $pagedata .= $body;
    $pagedata .= '</textarea>';
    $pagedata .= '	<script type="text/javascript">' . "\r\n";
    $pagedata .= '	//<![CDATA[' . "\r\n";
    $pagedata .= '		CKEDITOR.replace( \'TextAreaData\', {' . "\r\n";
    $pagedata .= '				enterMode : CKEDITOR.ENTER_BR,' . "\r\n";
    $pagedata .= '				filebrowserImageBrowseUrl : \'ImageManager/imagemanager.php?Type=Images\',' . "\r\n";
    $pagedata .= '				filebrowserFlashBrowseUrl : \'ImageManager/imagemanager.php?Type=Flash\',' . "\r\n";
    $pagedata .= '				extraPlugins : \'autogrow\',' . "\r\n";
    $pagedata .= '				toolbar : \'FullToolBar\',' . "\r\n";
    $pagedata .= '				removePlugins : \'resize\'' . "\r\n";
    $pagedata .= '			});' . "\r\n";
    $pagedata .= '	//]]>' . "\r\n";
    $pagedata .= '	</script>' . "\r\n";
    $pagedata .= '</form></div>';
    $pagedata .= linkButton('menu.php?website=' . $siteid, MSG00129) . helpIcon(MSG00016) . ' ';
    $pagedata .= linkButton('preview.php?website=' . $siteid . '&hidemenu', MSG00017) . helpIcon(MSG00018) . ' ';
    echo $pagedata;
}
Esempio n. 7
0
function showClientWebsites($userid)
{
    $db = Database::obtain();
    $sql = "SELECT * FROM " . TABLE_WEBSITES . "\n\t\t\t\t\tWHERE `website_user` =" . $db->escape($userid) . "";
    $websites = $db->fetch_array($sql);
    $block = tableStyles() . linkButton('sz.php?website&add', MSG00147) . helpIcon(MSG00148) . '<br>';
    if (isUser($userid)) {
        $block .= '<font style="font-size:12px; color:red;">' . MSG00143 . '</font><br>';
    }
    $block .= '
		<table width="100%" cellpadding="5px" cellspacing="0" border="0" style="margin-left:auto; margin-right:auto; background-color:#D6D6D6;"><tr style="font-weight:bold; background-color:#626762;"><th>' . MSG00144 . helpIcon(MSG00142) . '</th><th>' . MSG00145 . helpIcon(MSG00141) . '</th><th>' . MSG00146 . helpIcon(MSG00140) . '</th></tr>';
    $i = 0;
    foreach ($websites as $site) {
        $i++;
        if ($i % 2) {
            $style = 'class="even" onMouseOver="this.className=\'highlight\'" onMouseOut="this.className=\'even\'"';
        } else {
            $style = 'class="odd" onMouseOver="this.className=\'highlight\'" onMouseOut="this.className=\'odd\'"';
        }
        $block .= "<tr " . $style . "><td><a href=\"preview.php?website={$site['id']}&hidemenu\">{$site['website_name']}</a></td><td>{$site['website_description']}</td><td style=\"text-align:center;\">";
        $block .= '<a href="javascript:confirmDelete(\'sz.php?website=' . $site['id'] . '&delete\')">' . icon('delete') . '</a> ';
        $block .= "<a href=\"sz.php?website={$site['id']}&download\">" . icon('download') . "</a> <a href=\"template.php?website={$site['id']}\"</a>" . icon('edit') . "\n\t\t\t</td></tr>";
    }
    $block .= '</table><br>';
    echo $block;
}
Esempio n. 8
0
function addStaticWebsite($userid)
{
    sysMsg(MSG00179);
    echo linkButton('invoices.php?add=staticweb', MSG00178);
}