Ejemplo n.º 1
0
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;
}
Ejemplo 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;
}
Ejemplo 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>
Ejemplo n.º 4
0
    </ul>
  </div>
</div>

<!--<div style="float: left; width: 18%; margin-left: 10px">
    <h3 class="ui-widget-header">Sidebar</h3>
    <div class="ui-widget-content">
        <ul id="lista-sidebar" style="min-height: 200px; list-style-type: none;">
            <li class="placeholder">Arraste os objetos aqui</li>
        </ul>
    </div>
</div>-->

<div style="float: right; width: 30%">
  <h3 class="ui-widget-header">Objects <?php 
echo helpIcon(t('Click for add to left panel'));
?>
</h3>
  <div id="catalogo">
    <h2><a href="#">Components</a></h2>
    <div>
      <ul style="list-style: none">
        <?php 
foreach ($componentList as $key => $comp) {
    ?>
          <li id="<?php 
    echo $key;
    ?>
"><a href="#" title="click to add this component"><img src="<?php 
    echo site_url('img/addicon.png');
    ?>
Ejemplo n.º 5
0
echo $email . ' ' . helpIcon(MSG00237);
?>
			</td>
			<td style="font-weight:bold; text-align:right;">
				<?php 
echo MSG00215;
?>
:
			</td>
			<td>
				<?php 
if (isDeveloper($userid)) {
    echo $renewdate . ' ' . helpIcon(MSG00240);
} else {
    echo $renewdate . ' ' . helpIcon(MSG00241);
}
?>
			</td>
		</tr>
		<tr style="background-color:#000000;">
			<td colspan="4" style="color:yellow;font-size:12px;text-align:center; font-weight:normal;"><?php 
echo $profilemsg . ' ' . helpIcon(MSG00244);
?>
</td>
		</tr>
	</tbody>
</table>
 <?php 
if (isAdmin($_SESSION['userid'])) {
    echo showAdminStats();
}
Ejemplo n.º 6
0
<div class="box-errors"></div>
<div class="build-pages">
    <h2>Pages</h2> <b>(<?php 
echo anchor('builder/page_new', t('+ Create new page'));
?>
)</b>
    <br/><br>
    <table>
        <tr>
            <th>Path <?php 
echo helpIcon(t('Click on path to see the generated page'));
?>
</th>
            <!--<th>Pagina</th>-->
            <th>Status</th>
            <th>Options</th>
        </tr>
    <?php 
foreach ($pages as $key => $page) {
    ?>
        <tr style="
                <?php 
    if ($page_current == $key) {
        ?>
background-color: #fbd850<?php 
    }
    ?>
                ">
            <td>
                <?php 
    if (isset($page['showonmenu']) && (bool) $page['showonmenu'] && in_array($page['pageType'], array('', 'simple'))) {
Ejemplo n.º 7
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;
}
Ejemplo n.º 8
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;
}
Ejemplo n.º 9
0
 function addEditDialogHTML($add = 0)
 {
     global $user;
     # dialog for on page editing
     $h = '';
     $h .= "<div dojoType=dijit.Dialog\n";
     $h .= "      id=\"addeditdlg\"\n";
     $h .= "      title=\"Edit {$this->restypename}\"\n";
     $h .= "      duration=250\n";
     $h .= "      draggable=true>\n";
     $h .= "<div id=\"addeditdlgcontent\">\n";
     $h .= "<div id=\"mgmtnodedlgcontent\">\n";
     $h .= "<div style=\"text-align: center;\">\n";
     $h .= "<small>* denotes required fields</small><br><br>\n";
     $h .= "</div>\n";
     # id
     $h .= "<input type=\"hidden\" id=\"editresid\">\n";
     #$h .= "<div style=\"width: 80%; margin-left: 10%;\">\n";
     # name
     $errmsg = i("Name can only contain letters, numbers, dashes(-), periods(.), and underscores(_). It can be from 1 to 50 characters long.");
     $h .= labeledFormItem('name', i('Name') . '*', 'text', '^([a-zA-Z0-9_][-a-zA-Z0-9_\\.]{1,49})$', 1, '', $errmsg);
     # owner
     $extra = array('onKeyPress' => 'setOwnerChecking');
     $h .= labeledFormItem('owner', i('Owner') . '*', 'text', '', 1, "{$user['unityid']}@{$user['affiliation']}", i('Unknown user'), 'checkOwner', $extra);
     $cont = addContinuationsEntry('AJvalidateUserid');
     $h .= "<input type=\"hidden\" id=\"valuseridcont\" value=\"{$cont}\">\n";
     # IP address
     $ipreg = '(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)';
     $ipreg1 = "^{$ipreg}\$";
     $errmsg = i("Invalid IP address specified - must be a valid IPV4 address");
     $h .= labeledFormItem('ipaddress', i('IP Address') . '*', 'text', $ipreg1, 1, '', $errmsg);
     # State
     $vals = array(2 => "available", 10 => "maintenance", 5 => "failed");
     $h .= labeledFormItem('stateid', i('State'), 'select', $vals);
     # sysadmin email
     $reg = '^([A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4},)*([A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4})$';
     $errmsg = i("Invalid email address(es) specified");
     $h .= labeledFormItem('sysadminemail', i("SysAdmin Email Address(es)"), 'text', $reg, 0, '', $errmsg, '', '', '', helpIcon('sysadminemailhelp'));
     # shared mailbox
     $reg = '^([A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4})$';
     $errmsg = i("Invalid email address specified");
     $h .= labeledFormItem('sharedmailbox', i('Address for Shadow Emails'), 'text', $reg, 0, '', $errmsg, '', '', '', helpIcon('sharedmailboxhelp'));
     # checkininterval
     $extra = array('smallDelta' => 1, 'largeDelta' => 2);
     $h .= labeledFormItem('checkininterval', i('Check-in Interval (sec)'), 'spinner', '{min:5,max:30,places:0}', 1, '6', '', '', $extra, '', helpIcon('checkinhelp'));
     # installpath
     $reg = '^([-a-zA-Z0-9_\\.\\/]){2,100}$';
     $errmsg = i("Invalid install path specified");
     $h .= labeledFormItem('installpath', i('Install Path'), 'text', $reg, 0, '', $errmsg, '', '', '', helpIcon('installpathhelp'));
     # timeserver list
     $reg = '^(([a-zA-Z0-9_][-a-zA-Z0-9_\\.]{1,49})(,?)){1,5}$';
     $errmsg = i("Invalid time server(s) specified. Must be comman delimited list of hostnames or IP addresses, with up to 5 allowed");
     $val = getVariable('timesource|global');
     $h .= labeledFormItem('timeservers', i('Time Server(s)'), 'text', $reg, 0, $val, $errmsg, '', '', '', helpIcon('timeservershelp'));
     # keys
     $reg = '^([-a-zA-Z0-9_\\.\\/,]){2,1024}$';
     $errmsg = i("Invalid path to identity key files");
     $h .= labeledFormItem('keys', i('End Node SSH Identity Key Files'), 'text', $reg, 0, '', $errmsg, '', '', '', helpIcon('identityhelp'));
     # sshport
     $extra = array('smallDelta' => 1, 'largeDelta' => 2);
     $h .= labeledFormItem('sshport', i('SSH Port for this node'), 'spinner', '{min:1,max:65535,places:0}', 1, '22', '', '', $extra, '', helpIcon('sshporthelp'));
     # image library
     $h .= "<div class=\"boxedoptions\">\n";
     # imagelibenable
     $extra = array('onChange' => 'toggleImageLibrary();');
     $h .= labeledFormItem('imagelibenable', i('Enable Image Library'), 'check', '', '', '', '', '', $extra, '', helpIcon('imagelibhelp'));
     # imagelibgroupid
     $disabled = array('disabled' => 'true');
     $vals = getUserResources(array('mgmtNodeAdmin'), array("manageGroup"), 1);
     $h .= labeledFormItem('imagelibgroupid', i('Image Library Management Node Group'), 'select', $vals['managementnode'], '', '', '', '', $disabled, '', helpIcon('imagelibgrouphelp'));
     # imagelibuser
     $reg = '^([-a-zA-Z0-9_\\.\\/,]){2,20}$';
     $errmsg = i("Invalid image library user");
     $h .= labeledFormItem('imagelibuser', i('Image Library User'), 'text', $reg, 0, '', $errmsg, '', $disabled, '', helpIcon('imagelibuserhelp'));
     # imagelibkey
     $reg = '^([-a-zA-Z0-9_\\.\\/,]){2,100}$';
     $errmsg = i("Invalid image library identity key");
     $h .= labeledFormItem('imagelibkey', i('Image Library SSH Identity Key File'), 'text', $reg, 0, '', $errmsg, '', $disabled, '', helpIcon('imagelibkeyhelp'));
     $h .= "</div>\n";
     # image library
     # IP config method
     $h .= "<div class=\"boxedoptions\">\n";
     # publicIPconfig
     $extra = array('onChange' => 'togglePublic();');
     $vals = array('dynamicDHCP' => 'Dynamic DHCP', 'manualDHCP' => 'Manual DHCP', 'static' => 'Static');
     $h .= labeledFormItem('publicIPconfig', i('Public NIC configuration method'), 'select', $vals, '', '', '', '', $extra, '', helpIcon('ipconfighelp'));
     # netmask
     $errmsg = i("Invalid public netmask");
     $h .= labeledFormItem('publicnetmask', i('Public Netmask'), 'text', $ipreg1, 0, '', $errmsg, '', $disabled, '', helpIcon('netmaskhelp'));
     # gateway
     $reg = '^[a-zA-Z0-9_][-a-zA-Z0-9_\\.]{1,56}$';
     $errmsg = i("Invalid public gateway");
     $h .= labeledFormItem('publicgateway', i('Public Gateway'), 'text', $reg, 0, '', $errmsg, '', $disabled, '', helpIcon('gatewayhelp'));
     # dnsserver
     $reg = "^({$ipreg},)*({$ipreg})\$";
     $errmsg = i("Invalid public DNS server");
     $h .= labeledFormItem('publicdnsserver', i('Public DNS Server'), 'text', $reg, 0, '', $errmsg, '', $disabled, '', helpIcon('dnsserverhelp'));
     $h .= "</div>\n";
     # IP config method
     # available public networks
     $h .= labeledFormItem('availablenetworks', i('Available Public Networks'), 'textarea', '', 1, '', '', '', '', '', helpIcon('availnetshelp'));
     # federated auth
     $h .= labeledFormItem('federatedauth', i('Affiliations using Federated Authentication for Linux Images'), 'textarea', '', 1, '', '', '', '', '', helpIcon('federatedauthhelp'));
     # NAT Host
     $h .= "<div id=\"nathost\" class=\"boxedoptions\">\n";
     # use as NAT host
     $extra = array('onChange' => "toggleNAThost();");
     $h .= labeledFormItem('nathostenabled', i('Use as NAT Host'), 'check', '', '', '1', '', '', $extra);
     # public IP
     $errmsg = i("Invalid NAT Public IP address specified - must be a valid IPV4 address");
     $h .= labeledFormItem('natpublicipaddress', i('NAT Public IP Address'), 'text', $ipreg1, 1, '', $errmsg, '', '', '', helpIcon('natpubliciphelp'));
     # internal IP
     $errmsg = i("Invalid NAT Internal IP address specified - must be a valid IPV4 address");
     $h .= labeledFormItem('natinternalipaddress', i('NAT Internal IP Address'), 'text', $ipreg1, 1, '', $errmsg, '', '', '', helpIcon('natinternaliphelp'));
     $h .= "</div>\n";
     # NAT Host
     $h .= "</div>\n";
     # mgmtnodedlgcontent
     $h .= "</div>\n";
     # addeditdlgcontent
     $h .= "<div id=\"addeditdlgerrmsg\" class=\"nperrormsg\"></div>\n";
     $h .= "<div id=\"editdlgbtns\" align=\"center\">\n";
     $h .= dijitButton('addeditbtn', "Confirm", "saveResource();");
     $h .= dijitButton('', "Cancel", "dijit.byId('addeditdlg').hide();");
     $h .= "</div>\n";
     # editdlgbtns
     $h .= "</div>\n";
     # addeditdlg
     $h .= "<div dojoType=dijit.Dialog\n";
     $h .= "      id=\"groupingnote\"\n";
     $h .= "      title=\"Management Node Grouping\"\n";
     $h .= "      duration=250\n";
     $h .= "      draggable=true>\n";
     $h .= "Each managemente node needs to be a member of a<br>management node resource group. The following dialog<br>will allow you to add the new management node to a group.<br><br>\n";
     $h .= "<div align=\"center\">\n";
     $h .= dijitButton('', "Close", "dijit.byId('groupingnote').hide();");
     $h .= "</div>\n";
     # btn div
     $h .= "</div>\n";
     # groupingnote
     $h .= "<div dojoType=dijit.Dialog\n";
     $h .= "      id=\"groupdlg\"\n";
     $h .= "      title=\"Management Node Grouping\"\n";
     $h .= "      duration=250\n";
     $h .= "      draggable=true>\n";
     $h .= "<div id=\"groupdlgcontent\"></div>\n";
     $h .= "<div align=\"center\">\n";
     $script = "    dijit.byId('groupdlg').hide();\n";
     $script .= "    checkFirstAdd();\n";
     $h .= dijitButton('', "Close", $script);
     $h .= "</div>\n";
     # btn div
     $h .= "</div>\n";
     # groupdlg
     $h .= "<div id=\"tooltips\">\n";
     $h .= helpTooltip('sysadminemailhelp', i("Comma delimited list of email addresses for sysadmins who should receive error emails from this management node. Leave empty to disable this feature."));
     $h .= helpTooltip('sharedmailboxhelp', i("Single email address to which copies of all user emails should be sent. This is a high traffic set of emails. Leave empty to disable this feature."));
     $h .= helpTooltip('checkinhelp', i("the number of seconds that this management node will wait before checking the database for tasks."));
     $h .= helpTooltip('installpathhelp', i("path to parent directory of image repository directories (typically /install) - only needed with bare metal installs or VMWare with local disk"));
     $h .= helpTooltip('timeservershelp', i("comma delimited list of time servers for this management node"));
     $h .= helpTooltip('identityhelp', i("comma delimited list of full paths to ssh identity keys to try when connecting to end nodes (optional)"));
     $h .= helpTooltip('sshporthelp', i("SSH port this node is listening on for image file transfers"));
     $h .= helpTooltip('imagelibhelp', i("Enable sharing of images between management nodes. This allows a management node to attempt fetching files for a requested image from other management nodes if it does not have them."));
     $h .= helpTooltip('imagelibgrouphelp', i("This management node will try to get image files from other nodes in the selected group."));
     $h .= helpTooltip('imagelibuserhelp', i("userid to use for scp when copying image files from another management node"));
     $h .= helpTooltip('imagelibkeyhelp', i("path to ssh identity key file to use for scp when copying image files from another management node"));
     $h .= helpTooltip('ipconfighelp', i("Method by which public NIC on nodes controlled by this management node recive their network configuration <ul><li>Dynamic DHCP - nodes receive an address via DHCP from a pool of addresses</li><li>Manual DHCP - nodes always receive the same address via DHCP</li><li>Static - VCL will configure the public address of the node</li></ul>"));
     $h .= helpTooltip('netmaskhelp', i("Netmask for public NIC"));
     $h .= helpTooltip('gatewayhelp', i("IP address of gateway for public NIC"));
     $h .= helpTooltip('dnsserverhelp', i("comma delimited list of IP addresses of DNS servers for public network"));
     $h .= helpTooltip('availnetshelp', i("This is a list of IP networks, one per line, available to nodes deployed by this management node. Networks should be specified in x.x.x.x/yy form.  It is for deploying servers having a fixed IP address to ensure a node is selected that can actually be on the specified network."));
     $h .= helpTooltip('federatedauthhelp', i("Comma delimited list of affiliations for which user passwords are not set for Linux image reservations under this management node. Each Linux image is then required to have federated authentication set up so that users' passwords are passed along to the federated authentication system when a user attempts to log in. (for clarity, not set setting user passwords does not mean users have an empty password, but that a federated system must authenticate the users)"));
     $h .= helpTooltip('natpubliciphelp', i("message"));
     $h .= helpTooltip('natinternaliphelp', i("message 2"));
     $h .= "</div>\n";
     # tooltips
     return $h;
 }