コード例 #1
0
ファイル: core.php プロジェクト: hscale/SiteZilla
function show_form($form, $msg = NULL)
{
    $users = User::total_users();
    $websites = created_websites_total();
    $templates = available_templates();
    include_once sz_config('base_path') . 'themes' . DS . sz_config('theme') . DS . 'forms' . DS . $form . '.php';
}
コード例 #2
0
ファイル: index.php プロジェクト: hscale/SiteZilla
<div class="Post-tr"></div>
<div class="Post-bl"></div>
<div class="Post-br"></div>
<div class="Post-tc"></div>
<div class="Post-bc"></div>
<div class="Post-cl"></div>
<div class="Post-cr"></div>
<div class="Post-cc"></div>
<div class="Post-body">
<div class="Post-inner">
<div class="PostContent">
<div class="article">
<h1>SiteZilla - Web Based Website Builder</h1>
<p>
<a href="index.php?templates"><img src="<?php 
echo sz_config('url') . 'themes' . DS . sz_config('theme');
?>
/images/tile.png" title="Website Templates" alt="Website Templates" width="550px" align="center"></a>Sed consequat adipiscing urna, nec adipiscing felis viverra at. Morbi pellentesque dui non augue pretium in molestie risus iaculis. Maecenas a ligula turpis, non auctor libero. Cras ipsum magna, accumsan quis sagittis eget, malesuada et nulla. Nam sit amet tellus libero. Pellentesque id augue id ligula lobortis fringilla vitae commodo nulla. Nullam at felis vel libero eleifend tincidunt. Quisque tempus aliquam odio varius porttitor. Suspendisse potenti. Phasellus varius fringilla arcu. Etiam est diam, consectetur quis tempor non, egestas at erat. Lorem ipsum dolor sit amet, consectetur adipiscing elit.<br><br>

In hac habitasse platea dictumst. Mauris metus nibh, interdum quis aliquet ac, volutpat at purus. Nam vitae risus id mauris rutrum lobortis vel in lacus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In ac iaculis tellus. Nulla luctus risus sodales dui venenatis facilisis bibendum felis tempor. Sed dapibus, neque et bibendum dignissim, mi urna rhoncus mauris, vel blandit metus lectus eget lorem. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi at dui arcu, at tempus tortor.
</p>
</div>
</div>
<div class="cleared"></div>
</div>
</div>
</div>



</td></tr>
コード例 #3
0
ファイル: login.php プロジェクト: hscale/SiteZilla
include_once 'pages/sidebar.php';
?>
		</td><td>
<br><br>

<form action="index.php" method="post">
		<noscript>
			<input name="js_disabled" type="hidden" value="1">
		</noscript>
		<table id="loginbox" border="0">
 		<tr><td>
   		<p>Username:</p><input type="text" name="user" value="" size="20" maxlength="20" />
  		</td><td>
   		<p>Password:</p><input type="password" name="pass" value="" size="20" maxlength="20" />
  		</td></tr>
 		<tr align="center">
  		<td colspan="2" align="center"><font style="font-size:12px;">
   		Forgot your password? <a href="index.php?resetpw">Click here..</a></font><input class="button" type="submit" value=" " />
  		</td></tr><tr><td colspan="2" style="vertical-align:middle;"><font style="font-weight:bold;font-size:14px;color:#FFFFFF; padding: 0 10px 0;">Not registered yet? Register Now! </font><a href="index.php?register"><img src="themes/<?php 
echo sz_config('theme');
?>
/images/register_button.png" height="20px" width="80px"></a></td></tr>
		</table>
</form>

<br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br>


</td></tr>
</table>
コード例 #4
0
ファイル: index.php プロジェクト: hscale/SiteZilla
                    }
                } else {
                    show_form('passreset', translate('You have entered an invalid email address. Please try again.', sz_config('language')));
                }
            } else {
                show_form('passreset', '');
            }
        }
        break;
    default:
        if ($nrgic == 'showregmsg') {
            show_msg(translate('Your request has been forwarded. We will notify you as soon as you can register again.', sz_config('language')));
        }
        show_page('index');
        break;
}
//BEGIN FUNCTIONS
function blankRegForm($msg)
{
    $newuser = array();
    $newuser['username'] = '';
    $newuser['fullnames'] = '';
    $newuser['group'] = '';
    $newuser['phone'] = '';
    $newuser['user_website'] = '';
    $newuser['email'] = '';
    $newuser['referred_by'] = $_SESSION['ref'];
    registerForm($msg, $newuser);
}
include_once 'themes/' . sz_config('theme') . '/footer.php';
コード例 #5
0
ファイル: user.php プロジェクト: hscale/SiteZilla
 public function display_profile()
 {
     $userid = $this->id;
     $username = $this->username;
     $maxwebsites = $this->maxwebsites;
     $fullnames = $this->full_names;
     $phone = $this->phone;
     $user_website = $this->website;
     $email = $this->email;
     if (isset($_SESSION['last_visit'])) {
         $last_visit = $_SESSION['last_visit'];
     } else {
         $last_visit = $this->last_visit;
     }
     $register_date = $this->joined_date;
     $status = $this->status;
     $group = $this->group;
     $date = getdate();
     //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 = $this->language;
     $profilemsg = file_get_contents('pages' . DS . 'profile_message.php');
     $statuslink = '';
     if ($this->status_id == '0') {
         if ($this->group == 'User') {
             $statuslink = ' - ' . text_link(script_name() . '?activate', translate('Activate your account', sz_config('language'))) . help_icon(translate('Activation is free. Click here to activate your account. Once you account is active you will be able to create your first website.', sz_config('language')));
         } else {
             $statuslink = ' - ' . text_link(script_name() . '?activate' . translate('Activate your account', sz_config('language'))) . help_icon(translate('Click here to activate your account. Once you account is active you will be able to create your first website.', sz_config('language')));
         }
     } elseif ($this->status_id == '3') {
         $statuslink = ' - ' . text_link('mailto:' . sz_config('email'), translate('Please email us.', sz_config('language')));
     }
     include_once sz_config('base_path') . 'themes' . DS . sz_config('theme') . DS . 'views' . DS . 'profile.php';
 }
コード例 #6
0
ファイル: footer.php プロジェクト: hscale/SiteZilla
// *************************************************************************
// *                                                                       *
// * This program is free software: you can redistribute it and/or modify  *
// * it under the terms of the GNU General Public License as published by  *
// * the Free Software Foundation, either version 3 of the License, or     *
// * (at your option) any later version.                                   *
// *                                                                       *
// * 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/>. *
// *                                                                       *
// *************************************************************************
?>
    </div>
    </div>
    <div id="footer" ><?php 
echo '<a href="' . sz_config('url') . '">' . sz_config('name') . '</a> ' . sz_config('version') . ' Copyright &copy ' . sz_config('year') . ' ' . sz_config('company');
?>
</div>
</div>
 <?php 
if (file_exists(sz_config('base_path') . 'inc' . DS . 'debug.php')) {
    include_once sz_config('base_path') . 'inc' . DS . 'debug.php';
}
?>
</body>
</html>
コード例 #7
0
ファイル: help.php プロジェクト: hscale/SiteZilla
. An example of an acceptable footer is:<br><br>

<strong>&lt;div id="footer"&gt;</strong><br>
&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;WEBSITE_FOOTER&lt;br&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;TEMPLATE_AUTHOR/p&gt;<br>
<strong>&lt;/div&gt;</strong>
<br><br>

<strong>TEMPLATE_AUTHOR</strong> will be replaced by:<br>
'- Template by ' and the content in <strong>author.php</strong> which will produce a full link. Example:<br><br>
- Template by &lt;a href="http://www.youwebsite.domain" target="_blank" alt="Your Name" title="Your Name"&gt;Your Name&lt;/a&gt;<br>

<h3>[author.php]</h3>

<strong>author.php</strong> should only contain a link back to the template author's website and nothing else. <?php 
echo sz_config('name');
?>
 will take care of the rest. Example contents of <strong>author.php</strong> is:<br><br>

&lt;a href="http://www.youwebsite.domain" target="_blank" alt="Your Name" title="Your Name"&gt;Your Name&lt;/a&gt;&lt;<br>


<h3>[menu.php]</h3>

		Placeholders used in menu.php are as follow:<br>
  <ul>
	<li>WEBSITE_MENU_ITEM_LINK</li>
	<li>WEBSITE_MENU_ITEM</li>
  </ul>

The file containing the necessary info to create the individual menu links are called <strong>menu.php</strong> and it consists of only two placeholders. It should only contain a single menu link. An example of the content in <strong>menu.php</strong> could be:<br><br>
コード例 #8
0
ファイル: template.php プロジェクト: hscale/SiteZilla
 public static function show_templates($website_id, $start_record, $category_id, $action = NULL)
 {
     $templates_per_page = sz_config('items_per_page');
     $end_record = $templates_per_page;
     $website_template = '';
     $checked = '';
     //$list = itemsPerPageLinks().'<br>';
     $list = '';
     $db = Database::obtain();
     if ($website_id > 0 && $action == 'select') {
         $sql = "SELECT `website_template` FROM " . TABLE_WEBSITES . "\n\t\t\t\t\tWHERE `id` =" . $website_id . "";
         $websitedata = $db->query_first($sql);
         $website_template = $websitedata['website_template'];
     }
     $templates = self::template_generate_list();
     $totaltemplates = sizeof($templates) - 1;
     $lastpage = $totaltemplates - $templates_per_page;
     if ($lastpage < 0) {
         $lastpage = 0;
     }
     if ($start_record > $totaltemplates) {
         $start_record = $totaltemplates - $templates_per_page;
     }
     $ep = $start_record + $templates_per_page;
     $tlist = array();
     foreach ($templates as $i => $t) {
         if ($i >= $start_record && $i < $ep) {
             $tlist[] = $t;
         }
     }
     $templates = $tlist;
     if ($action == 'select') {
         $list .= '<form action="template.php?website=' . $website_id . '&action=save&tview=' . $start_record . '" method="post">';
     }
     $list .= '<table cellspacing="5" cellpadding="0" border="0" align="center"><tr>';
     foreach ($templates as $i => $t) {
         $list .= '<td align="center" id="templatebox" width="160px" heigh="160px">';
         $list .= '<span id="templatename">' . nice_name($t) . '</span><a href="templates/' . $t . '/preview.jpg" target="_blank" onclick="window.open(\'' . sz_config('url') . 'templates/' . $t . '/preview.jpg\',\'popup\',\'scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0\'); return false"><img src="templates/' . $t . '/preview.jpg" width="140px" height="90px"></a>';
         if ($action != NULL) {
             if ($t == $website_template) {
                 $checked = 'checked="checked"';
             } else {
                 $checked = '';
             }
             $list .= '<span id="templateselect">' . translate('Select Template', sz_config('language')) . '</span><input name="website_template" value="' . $t . '" type="radio" ' . $checked . '/></td>';
         } else {
             $list .= '<span id="author">' . translate('Template Author', sz_config('language')) . ': </span><span id="authorname">' . self::get_author($t) . '</span></td>';
         }
         if (($i + 1) % 5 == 0) {
             $list .= '<tr></tr>';
         }
     }
     $list .= '</tr>';
     if ($action == 'select') {
         $list .= '<tr><td colspan="5"><span class="button-wrapper">';
         $list .= '<span class="button-l"> </span>';
         $list .= '<span class="button-r"> </span>';
         $list .= '<input class="button" type="submit" value="' . translate('Save', sz_config('language')) . '">';
         $list .= '</span> ' . help_icon('Save the selected template. You can select the template that you want to use by clicking on the radio button below \'Select Template\' of the desired template. To get a bigger preview of the template click on the template image.', sz_config('language'));
         $list .= link_button('settings.php?website=' . $website_id, translate('Next Step', sz_config('language'))) . ' ' . help_icon(translate('Go to the next step. Do not forget to save your template selection with the save button first. You can also go to any editing step in the Website Menu at the top of this window.', sz_config('language')));
         $list .= '</form></td></tr>';
     }
     $list .= '<tr><td colspan="5" id="pagnat">' . help_icon(translate('Select the next page number to view more templates.', sz_config('language'))) . ' ';
     $prev = $start_record - $templates_per_page;
     if ($prev < 0) {
         $prev = $start_record;
     }
     if ($action == 'select') {
         $list .= '<a href="template.php?website=' . $website_id . '&tview=0">' . icon('first', '22px') . '</a> ';
         $list .= '<a href="template.php?website=' . $website_id . '&tview=' . $prev . '">' . icon('previous', '22px') . '</a> ';
     } else {
         $list .= '<a href="index.php?templates&tview=0">' . icon('first', '22px') . '</a> ';
         $list .= '<a href="index.php?templates&tview=' . $prev . '">' . icon('previous', '22px') . '</a> ';
     }
     $x = 0;
     $y = 1;
     while ($x < $totaltemplates) {
         if ($x == $start_record) {
             $navclass = 'id="pactive"';
             $ncls = true;
         } else {
             $navclass = '';
             $ncls = false;
         }
         if ($action == 'select') {
             $list .= ' <span ' . $navclass . '><a href="template.php?website=' . $website_id . '&tview=' . $x . '">' . icon($y, '22px', $ncls) . '</a>' . icon('space', '22px') . '</span> ';
         } else {
             $list .= ' <span ' . $navclass . '><a href="index.php?templates&tview=' . $x . '">' . icon($y, '22px', $ncls) . '</a>' . icon('space', '22px') . '</span> ';
         }
         $x = $x + $templates_per_page;
         $y++;
     }
     $lastpage = $x - $templates_per_page;
     $next = $start_record + $templates_per_page;
     if ($next > $lastpage) {
         $next = $lastpage;
     }
     if ($action == 'select') {
         $list .= '<a href="template.php?website=' . $website_id . '&tview=' . $next . '">' . icon('next', '22px') . '</a> ';
         $list .= '<a href="template.php?website=' . $website_id . '&tview=' . $lastpage . '">' . icon('last', '22px') . '</a>';
     } else {
         $list .= '<a href="index.php?templates&tview=' . $next . '">' . icon('next', '22px') . '</a> ';
         $list .= ' <a href="index.php?templates&tview=' . $lastpage . '">' . icon('last', '22px') . '</a>';
     }
     $list .= '</td><tr></table>';
     echo $list;
 }
コード例 #9
0
ファイル: debug.php プロジェクト: hscale/SiteZilla
function debug_info()
{
    if (isset($_SESSION['website'])) {
        $currsite = $_SESSION['website'];
    } else {
        $currsite = 0;
    }
    $gl = $_GET;
    $globs = '';
    if (is_array($gl)) {
        foreach ($gl as $key => $value) {
            $globs .= '[' . $key . ']=[' . $value . '],';
        }
    }
    $pv = $_POST;
    $post = '';
    if (is_array($pv)) {
        foreach ($pv as $key => $value) {
            $post .= '[' . $key . ']=[' . $value . '],';
        }
    }
    $gv = $_GET;
    $get = '';
    if (is_array($gv)) {
        foreach ($gv as $key => $value) {
            $get .= '[' . $key . ']=[' . $value . '],';
        }
    }
    $sv = $_SESSION;
    $sess = '';
    if (is_array($sv)) {
        foreach ($sv as $key => $value) {
            $sess .= '[' . $key . ']=[' . $value . '],';
        }
    }
    echo '<br><table width="100%" cellpadding="5px" cellspacing="0" border="1" style="margin-left:auto; margin-right:auto; background-color:#D6D6D6;">
			<tr style="background-color:yellow;" >
				<td colspan="2" style="font-weight:bold; text-align:center; color:red;"><strong>DEBUG MODE ENABLED</strong> - ' . date("Y-m-d H:i:s") . '</td>
			</tr>
			<tr style="background-color:#A3A3A3;">
				<td style="vertical-align: top;" width="190px"><strong>BASE URL:</strong> </td><td>' . sz_config('base_path') . '</td>
			</tr>
			<tr style="background-color:#D6D6D6;">
				<td style="vertical-align: top;"><strong>CURRENT WEBSITE:</strong> </td><td>' . $currsite . '</td>
			</tr>
			<tr style="background-color:#A3A3A3;">
				<td style="vertical-align: top;"><strong>_GET:</strong> </td><td>' . $get . '</td>
			</tr>
			<tr style="background-color:#D6D6D6;">
				<td style="vertical-align: top;"><strong>_POST:</strong> </td><td>' . $post . '</td>
			</tr>
			<tr style="background-color:#A3A3A3;">
				<td style="vertical-align: top;"><strong>_SESSION:</strong> </td><td>' . $sess . '</td>
			</tr>
			<tr style="background-color:#D6D6D6;">
				<td style="vertical-align: top;"><strong>_HTTP_USER_AGENT:</strong> </td><td>' . $_SERVER["HTTP_USER_AGENT"] . '</td>
			</tr>
			<tr style="background-color:#A3A3A3;">
				<td style="vertical-align: top;"><strong>_REMOTE_ADDR:</strong> </td><td>' . $_SERVER["REMOTE_ADDR"] . '</td>
			</tr>
			<tr style="background-color:#D6D6D6;">
				<td style="vertical-align: top;"><strong>_GLOBALS:</strong> </td><td>' . $globs . '</td>
			</tr>
			<tr style="background-color:#A3A3A3;">
				<td style="vertical-align: top;"><strong>_REQUEST_URI:</strong> </td><td>' . $_SERVER["REQUEST_URI"] . '</td>
			</tr>
			<tr style="background-color:#D6D6D6;">
				<td style="vertical-align: top;"><strong>_SCRIPT_NAME:</strong> </td><td>' . $_SERVER["SCRIPT_NAME"] . '</td>
			</tr>
			<tr style="background-color:#A3A3A3;">
				<td style="vertical-align: top;"><strong>_QUERY_STRING:</strong> </td><td>' . $_SERVER["QUERY_STRING"] . '</td>
			</tr>
			<tr style="background-color:#D6D6D6;">
				<td style="vertical-align: top;"><strong>_SESSION EXPIRE:</strong> </td><td>' . session_cache_expire() . ' minites</td>
			</tr>
		</table>';
}
コード例 #10
0
ファイル: web_elements.php プロジェクト: hscale/SiteZilla
function help_icon($msg)
{
    if (sz_config('js_enabled')) {
        $data = '<a href="#" rel="sztooltip"><img src="' . sz_config('url') . 'themes' . DS . sz_config('theme') . DS . 'images' . DS . 'help.png" height="18px"></a><div class="sztooltip">' . $msg . '</div>';
        return $data;
    } else {
        return '';
    }
}