Well, you asked me to point it out so here it is:
administration/banners.php
// Functions
function getPreviewBlock($iBannerID) {
$sPreview = MsgBox(_t('_Empty'));
if ($_GET['action'] == 'preview' && $iBannerID > 0) {
$aBannerInfo = db_arr("SELECT * FROM `sys_banners` WHERE `ID` = '{$iBannerID}'");
$sBannerTitle = process_line_output($aBannerInfo['Title']);
$sBannerPut = banner_put($aBannerInfo['ID'], 0);
$sPreview = <<<EOF
<table cellspacing=1 cellpadding=1 width=90% height=200 align=center style="border: 1px solid #ccc;">
{$sBannerTitle}
<tr><td align=center bgcolor=white>{$sBannerPut}</td></tr>
</table>
EOF;
$sResult = $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_content.html', array('content' => $sPreview));
return DesignBoxContent(_t('_Preview'), $sResult, 1);
}
}
And:
$sActionAdd = ($action == "modify") ? $sAsNew . ' <input type=checkbox name=as_new />' : '';
$sCustomPositions = <<<EOF
<table border=0 width=100% cellspacing=10 cellpading=20>
<tr>
<td colspan=5 align=center><input type=checkbox name="pos_top" {$sTopPosState} />{$sTopC}</td>
</tr>
<tr>
<td colspan=2 align=center><input type=checkbox name="pos_left" {$sLeftPosState} />{$sLeftC}</td>
<td> </td>
<td colspan=2 align=center><input type=checkbox name="pos_right" {$sRightPosState} />{$sRightC}</td>
</tr>
administration/db.php
if ($_POST['savetype'] == 'server') {
$sqlfile = BX_DIRECTORY_PATH_ROOT . 'backup/'.date("Y-m-d_H-i-s").'_'.$_POST['tbl'].'.sql';
$file = fopen($sqlfile, 'w');
fputs($file, $oNewBackup -> sInputs);
$status_text .= "<hr size=1 /><font color='green'><center>{$sSuccDumpedIntoFileC} <b>{$sqlfile}</b></center></font>\n";
fclose($file);
}
if ($_POST['savetype'] == 'show') {
$status_text = "<center><textarea cols='100' rows='30' name='content' style='font-family: Arial; font-size: 11px' readonly='readonly'>" . $oNewBackup -> sInputs ."</textarea></center>";
}
Should I even bother to comment on this one? The entire php file is just a huge mess of css/html throughout it. Would it be that hard to follow the standards on this and use a tmpl_uni/css/file for it?
adminstration/help.php
<html>
<head>
<style type="text/css">
.spec
{
float:left;
width:80px;
height:20px;
position:relative;
border: 1px solid silver;
text-align : center;
}
.desc
{
float:left;
width:360px;
height:20px;
position:relative;
border: 1px solid silver;
}
</style>
</head>
<body>
<div style="width:460px; position:relative;">
<h3><center>Do you want to change the Date Format for your site? It is possible, just follow the instructions.</h3>
</center><br>
<b>You need to switch some attributes.</b>
<br>
1)To show a date in the Format: <b>Day.Month.YYYY</b>, input into the Short or Long Date Format <b>%d.%m.%Y</b>.
<br><br>
2)To show a date and time - <b>Month/Day/Year Hours:Minutes:Seconds</b> input into the Long Date Format <b>%m/%d/%Y %H:%i:%s</b>.
<br><br>
3)To use PM or AM format for time input - <b>%I%p:%i:%s</b>. You will see time in this format <b>09am:43:12</b>.
<br><br>
4) you can use different types of separators: <br><br>
<center>
<table border=1>
<tr >
<td ><b>Separator</b></td>
<td><b>Format</b></td>
<td><b>Result</b></td>
</tr>
<tr align=center>
<td>.</td>
<td>Day.Month.YYYY</td>
<td>%d.%m.%Y</td>
</tr>
<tr align=center>
<td>/</td>
<td>Month/Day/Year</td>
<td>%m/%d/%Y</td>
</tr>
<tr align=center>
<td>*</td>
<td>Month*Day*Year</td>
<td>%m*%d*%Y</td>
</tr>
<tr align=center>
<td colspan=3 >some other separators: - : ; -- </b></td>
</tr>
</table>
</center>
<br>
<br>
<br>
<b>Use the list to form the date format on your liking.</b><br>
<br>
<div class="spec">Specifier</div>
<div class="desc">Description</div>
<div class="spec">%m</div>
<div class="desc">Month, numeric (01..12)</div>
<div class="spec">%w</div>
<div class="desc">Day of the week (0=Sunday..6=Saturday)</div>
<div class="spec">%d</div>
<div class="desc">Day of the month, numeric (00..31)</div>
<div class="spec">%Y</div>
<div class="desc">Year, numeric, 4 digits</div>
<div class="spec">%y</div>
<div class="desc">Year, numeric, 2 digits</div>
<div class="spec">%b</div>
<div class="desc">Abbreviated month name (Jan..Dec)</div>
<div class="spec">%H</div>
<div class="desc">Hour (00..23)</div>
<div class="spec">%I</div>
<div class="desc">Hour (01..12)</div>
<div class="spec">%p</div>
<div class="desc">AM or PM</div>
<div class="spec">%i</div>
<div class="desc">Minutes, numeric (00..59)</div>
<div class="spec">%s</div>
<div class="desc">Seconds (00..59)</div>
</div>
</body>
</html>
Next up:
administration/notifies.php
<html>
<head>
<style type="text/css">
.spec
{
float:left;
width:80px;
height:20px;
position:relative;
border: 1px solid silver;
text-align : center;
}
.desc
{
float:left;
width:360px;
height:20px;
position:relative;
border: 1px solid silver;
}
</style>
</head>
<body>
<div style="width:460px; position:relative;">
<h3><center>Do you want to change the Date Format for your site? It is possible, just follow the instructions.</h3>
</center><br>
<b>You need to switch some attributes.</b>
<br>
1)To show a date in the Format: <b>Day.Month.YYYY</b>, input into the Short or Long Date Format <b>%d.%m.%Y</b>.
<br><br>
2)To show a date and time - <b>Month/Day/Year Hours:Minutes:Seconds</b> input into the Long Date Format <b>%m/%d/%Y %H:%i:%s</b>.
<br><br>
3)To use PM or AM format for time input - <b>%I%p:%i:%s</b>. You will see time in this format <b>09am:43:12</b>.
<br><br>
4) you can use different types of separators: <br><br>
<center>
<table border=1>
<tr >
<td ><b>Separator</b></td>
<td><b>Format</b></td>
<td><b>Result</b></td>
</tr>
<tr align=center>
<td>.</td>
<td>Day.Month.YYYY</td>
<td>%d.%m.%Y</td>
</tr>
<tr align=center>
<td>/</td>
<td>Month/Day/Year</td>
<td>%m/%d/%Y</td>
</tr>
<tr align=center>
<td>*</td>
<td>Month*Day*Year</td>
<td>%m*%d*%Y</td>
</tr>
<tr align=center>
<td colspan=3 >some other separators: - : ; -- </b></td>
</tr>
</table>
</center>
<br>
<br>
<br>
<b>Use the list to form the date format on your liking.</b><br>
<br>
<div class="spec">Specifier</div>
<div class="desc">Description</div>
<div class="spec">%m</div>
<div class="desc">Month, numeric (01..12)</div>
<div class="spec">%w</div>
<div class="desc">Day of the week (0=Sunday..6=Saturday)</div>
<div class="spec">%d</div>
<div class="desc">Day of the month, numeric (00..31)</div>
<div class="spec">%Y</div>
<div class="desc">Year, numeric, 4 digits</div>
<div class="spec">%y</div>
<div class="desc">Year, numeric, 2 digits</div>
<div class="spec">%b</div>
<div class="desc">Abbreviated month name (Jan..Dec)</div>
<div class="spec">%H</div>
<div class="desc">Hour (00..23)</div>
<div class="spec">%I</div>
<div class="desc">Hour (01..12)</div>
<div class="spec">%p</div>
<div class="desc">AM or PM</div>
<div class="spec">%i</div>
<div class="desc">Minutes, numeric (00..59)</div>
<div class="spec">%s</div>
<div class="desc">Seconds (00..59)</div>
</div>
</body>
</html>
This is where it gets really old for us. It's been preached, prodded, beaten and persecuted into us to follow the rules & guidelines as we develop add-ons, mods & hacks to D to assist with it's development and keep things in an orderly fashion for all to follow. But, when D7 gets released we find the same stuff going on in it's files that has happened in the earlier versions. CSS/HTML being dumped into PHP files where it does not need to be. I'll agree, some things do, for instance when the CSS is being called from the DB due to a customer background or layout in a members profile. But for a page that will always resolve the same exact way there is no need to dump it in these PHP files and then force us to go hunting it down line by line when we need to make a simple layout change/adjustment.
In a previous blog talking about this with D6 it was recommended that we find the issues of it and post them in Trac. Can you picture the number of hours it will take to go through all of D7's files?