Esempio n. 1
0
    function listpending_cats($cats, $pathWay, $pageNav, $option)
    {
        ?>
		<form action="index2.php" method="post" name="adminForm">
		<table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist">
			<thead>
			<tr>
				<th width="44" align="right"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php 
        echo count($cats);
        ?>
);" /></th>
				<th class="title" width="30%" nowrap="nowrap"><?php 
        echo JText::_('Categories');
        ?>
</th>
				<th width="52%" align="left" nowrap="nowrap"><?php 
        echo JText::_('Parent');
        ?>
</th>
				<th width="100"><?php 
        echo JText::_('Created');
        ?>
</th>
			</tr>
			</thead>
		<?php 
        $k = 0;
        for ($i = 0, $n = count($cats); $i < $n; $i++) {
            $row =& $cats[$i];
            ?>
			<tr class="<?php 
            echo "row{$k}";
            ?>
" align="left">
				<td><a href="#go" onclick="return listItemTask('cb<?php 
            echo $i;
            ?>
','listcats')"><?php 
            if ($row->cat_image) {
                echo "<img border=\"0\" src=\"../components/com_mtree/img/dtree/imgfolder2.gif\" width=\"18\" height=\"18\" onmouseover=\"showInfo('" . $row->cat_name . "', '" . $row->cat_image . "', 'cat'); this.src='../components/com_mtree/img/dtree/imgfolder.gif'\" onmouseout=\"this.src='../components/com_mtree/img/dtree/imgfolder2.gif'; return nd(); \" />";
            } else {
                echo "<img border=\"0\" src=\"../components/com_mtree/img/dtree/folder.gif\" width=\"18\" height=\"18\" name=\"img" . $i . "\" onmouseover=\"this.src='../components/com_mtree/img/dtree/folderopen.gif'\" onmouseout=\"this.src='../components/com_mtree/img/dtree/folder.gif'\" />";
            }
            ?>
</a><input type="checkbox" id="cb<?php 
            echo $i;
            ?>
" name="cid[]" value="<?php 
            echo $row->cat_id;
            ?>
" onclick="isChecked(this.checked);" />
				</td>
				<td><a href="#edit" onclick="return listItemTask('cb<?php 
            echo $i;
            ?>
','editcat')"><?php 
            echo $row->cat_name;
            ?>
</a></td>
				<td><?php 
            echo $pathWay->printPathWayFromCat_withCurrentCat($row->cat_parent, 0);
            ?>
</td>
				<td><?php 
            echo tellDateTime($row->cat_created);
            ?>
</td>
			</tr><?php 
            $k = 1 - $k;
        }
        ?>

			<tfoot>
			<tr>
				<td colspan="4">
					<?php 
        echo $pageNav->getListFooter();
        ?>
				</td>
			</tr>
			</tfoot>
		</table>
		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="task" value="listpending_cats" />
		<input type="hidden" name="returntask" value="listpending_cats" />
		<input type="hidden" name="boxchecked" value="0" />
		</form>
		<?php 
    }
    function linkChecker($option, $num_of_links, $config)
    {
        global $mtconf;
        ?>
	<script language="javascript" type="text/javascript" src="<?php 
        echo $mtconf->getjconf('live_site') . $mtconf->get('relative_path_to_js_library');
        ?>
"></script>
	<script language="javascript" type="text/javascript" src="<?php 
        echo $mtconf->getjconf('live_site');
        ?>
/administrator/components/com_mtree/js/admin.js"></script>
	<script language="javascript" type="text/javascript" src="<?php 
        echo $mtconf->getjconf('live_site');
        ?>
/administrator/components/com_mtree/js/linkchecker.js"></script>
	<script language="javascript" type="text/javascript">
	jQuery.noConflict();
	var mosConfig_live_site='http://<?php 
        echo $_SERVER["SERVER_NAME"] . str_replace("/administrator/index2.php", "", $_SERVER["PHP_SELF"]);
        ?>
';
	var num_of_links='<?php 
        echo $num_of_links;
        ?>
';
	var msgLCCompleted = '<?php 
        echo JText::_('Link checker completed');
        ?>
';
	var msgLinksRemaining = '<?php 
        echo JText::_('Links remaining');
        ?>
';
	var checked=0;
	var okLinks=new Array();
	</script>
	<style type="text/css">
	tbody#problem table{border:0px solid red;padding:0px;margin:0px;}
	tbody#problem table td {border:0px;padding:0px;}
	#report {display:none;clear:both;text-align:center;margin:0 0 13px 0;}
	</style>
	<form action="index2.php" method="post" name="adminForm">
	<table width="100%">
		<tr>
			<td width="100%">
			<fieldset>
			<legend><?php 
        echo JText::_('Link checker');
        ?>
</legend>
			<table width="100%" border=0>
				<tr>
					<td width="50%" valign="top">
						<input type="button" value="Check Links" onclick="startLinkChecker()" /> &nbsp;<?php 
        printf(JText::_('There are x links in the directory'), $num_of_links);
        printf(JText::_('Last checked date'), empty($config['linkchecker_last_checked']->value) ? JText::_('Never') : tellDateTime($config['linkchecker_last_checked']->value));
        ?>
						<p />
						<a href="#" onclick="jQuery('#advancedoptions').slideToggle('fast');return false;"><?php 
        echo JText::_('Advanced options');
        ?>
</a>
						<div id="advancedoptions" style="display:none">
							<table>
								<tr><td width="20"><input type="checkbox" id="togglelinks" onclick="toggleLinks()" class="text_area" /></td><td width="99%"><label for="togglelinks"><?php 
        echo JText::_('Show all links');
        ?>
</label></td></tr>
								<tr><td colspan="2"><?php 
        printf(JText::_('Check x links every y seconds'), '<input type="text" value="' . $config['linkchecker_num_of_links']->value . '" name="linkchecker_num_of_links" id="linkchecker_num_of_links" size="3" class="text_area" />', '<input type="text" value="' . $config['linkchecker_seconds']->value . '" name="linkchecker_seconds" id="linkchecker_seconds" size="3" class="text_area" />');
        ?>
</td></tr>
							</table>
						</div>
					</td>
				</tr>
			</table>
			</fieldset>
			</td>
		</tr>
	</table>
	
	<div id="report">
		<div style="margin-left:35%;width:30%;height:20px;border:1px solid #000;"><div style="background-color:green;height:20px;" id="progressbar"></div></div>
		<div id="progresstext" style="text-align:center;margin-top:5px;font-weight:bold"></div>
	</div>

	<table class="adminlist">
	<tbody id="problem">
		<tr align="left"><th width="20"></th><th width="40%" align="left"><?php 
        echo JText::_('Website');
        ?>
</th><th width="20%" align="left"><?php 
        echo JText::_('Status code and reason');
        ?>
</th><th width="16">&nbsp;</th><th width="20%" align="left"><?php 
        echo JText::_('Action');
        ?>
</th><th width="20%" align="right">	</th></tr>
	</tbody>
	</table>

	<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
	<input type="hidden" name="task" value="linkchecker" />
	<input type="hidden" name="task2" value="linkchecker2" />
	</form>	
	<?php 
    }