[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.6

vertical align top

Asked by syedasimmeesaq in PHP Scripting Language, PHP for Windows, JavaScript

Hello experts

in the code below I want to vertically align the date on left TOP. Its right now showing the date on left center

I tried doing this
echo "<align=\"left\"><valign=\"top\">".$list_day;  but that didnt work. Below is the complete code

Thanks
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
<?php include('cp/config.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="tr" lang="tr" dir="ltr">
<head>
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css" media="all">
@import "style.css";.style1 {font-size: large}
.style2 {
	font-size: x-small;
	color: #333333;
}
</style>
<script language="JavaScript" type="text/javascript">
	window.defaultStatus="CAP Calendar";
</script>
<script type="text/JavaScript">
function popupEvent(day, month, year, w, h) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	win = window.open("popup.php?day=" + day + "&month=" + month + "&year=" + year + "","Calendar","scrollbars=yes, status=yes, location=no, toolbar=no, menubar=no, directories=no, resizable=yes, width=" + w + ", height=" + h + ", top=" + wint + ", left=" + winl + "");
	if (parseInt(navigator.appVersion) >= 4) {
		win.window.focus();
	}
}
</script>
</head>
<body>
<script type="text/JavaScript">
  var ol_width=140;
  var ol_delay=10;
  var ol_fgcolor="#FFFFFF";
  var ol_bgcolor="#AAAAAA";
  var ol_offsetx=10;
  var ol_offsety=10;
  var ol_border=1;
  var ol_vauto=1;
</script>
<div id="overDiv" style="position: absolute; visibility: hidden; z-index: 1000;"></div>
<script type="text/JavaScript" src="overlib_mini.js"><!-- overLIB (c) Erik Bosrup --></script>
<center>
 
<?php
 
if (empty($_GET['month'])) {
	$month = date('m');
} else {
	$month = $_GET['month'];
}
 
if (empty($_GET['year'])) {
	$year = date('Y');
} else {
	$year = $_GET['year'];
}
 
$theday = date('w', mktime(0, 0, 0, $month, 1, $year));
 
$daysinmonth = date("t", mktime(0, 0, 0, $month, 1, $year));
?>
 
<table width="670" border="1" cellpadding="0" cellspacing="1" class="mainTable">
<tr>
		<td align="center" colspan="7" class="monthRow">
			<a href="<?php echo $_SERVER['PHP_SELF']; if ($month == '01') { $prevmonth = '12'; $prevyear = $year - 1; echo '?month=' . $prevmonth; echo '&year=' . $prevyear; } else { $prevmonth = $month - 1; echo '?month=' . $prevmonth; echo '&year=' . $year; } ?>">&laquo;</a>
			<?php
				$monthName = date('F', mktime(0, 0, 0, $month, 1, $year));
				$yearName = date('Y', mktime(0, 0, 0, $month, 1, $year));
				echo $monthName . ' ' . $yearName;
			?>
			<a href="<?php echo $_SERVER['PHP_SELF']; if ($month == '12') { $nextmonth = '01'; $nextyear = $year + 1; echo '?month=' . $nextmonth; echo '&year=' . $nextyear; } else { $nextmonth = $month + 1; echo '?month=' . $nextmonth; echo '&year=' . $year; } ?>">&raquo;</a>		</td>
	</tr>
	<tr class="dayNamesText">
	  <td width="25" align="center" class="dayNamesRow style1">Sun</td>
	  <td width="25" align="center" class="dayNamesRow style1">Mon</td>
	  <td width="25" align="center" class="dayNamesRow style1">Tue</td>
	  <td width="25" align="center" class="dayNamesRow style1">Wed</td>
	  <td width="25" align="center" class="dayNamesRow style1">Thu</td>
	  <td width="25" align="center" class="dayNamesRow style1">Fri</td>
	  <td width="25" align="center" class="dayNamesRow style1">Sat</td>
	</tr>
 
	<tr class="rows">
	<?php
	for ($i = 0; $i < $theday; $i++) {
	?>
		<td height="27"><div align="left"><span class="style1"></span></div></td>
<?php
	}
	for ($list_day = 1; $list_day <= $daysinmonth; $list_day++) {
		$tm = date("U", mktime(0, 0, 0, $month, $list_day, $year)) - 86400; 
		$tn = date("U", mktime(0, 0, 0, $month, $list_day, $year)); 
		$tp = date("U", mktime(0, 0, 0, $month, $list_day, $year)) + 86400; 
		$Q = sprintf("SELECT * FROM `events` WHERE `date` > '%s' AND `date` < '%s' AND `day` = '%s';", $tm, $tp, $list_day);
		$R = mysql_query($Q);
		$D = mysql_fetch_assoc($R);
		$S = mysql_num_rows($R);
		$Y = $D['date'];
		$TheDay = date('d', $Y);
		$TheMon = date('F', $Y);
		$TheYea = date('Y', $Y);
		mysql_free_result($R);
		if ($S) {
		?>
        
			<td align="center" onclick="popupEvent(<?php echo $D['day']; ?>, <?php echo $D['month']; ?>, <?php echo $D['year']; ?>, 400, 500)" style="background-color: #CCFF00; color: #333333; cursor: pointer;" onmouseover="return overlib('&lt;table width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; class=&quot;popupDateTable&quot;&gt;&lt;tr&gt;&lt;td align=&quot;center&quot; class=&quot;popupDate&quot;&gt;<?php echo $TheDay; ?> <?php echo $TheMon; ?> <?php echo $TheYea; ?>&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class=&quot;popupEventTitle s23&quot;&gt;<?php echo $S; ?> Record(s)&lt;/div&gt;');" onmouseout="return nd();" title=""><div align="left"><br />
			  
			  
			  
			  
			  
			    <span class="style1">
	            <?php
		} elseif ($tn > $tm AND $tn < $tp AND date('j') == $list_day AND date('m') == $month AND date('Y') == $year) {
		?>
		          </span>
			  </div>
			<td align="center" style="background-color: #FFC18A; color: #CF0000; cursor: pointer;" onmouseover="return overlib('&lt;div style=&quot;background-color: #FFC18A; color: #CF0000; padding: 4px;&quot;&gt;Today&lt;/div&gt;');" onmouseout="return nd();">
		      <div align="left">
		        <?php
		} elseif ($theday == 6 or $theday == 0) {
		?>
	            </div>
			<td align="center" style="background-color: #EEEEEE; color: #666666;">
		      <div align="left">
		        <?php
		} else {
		?>
	            </div>
			<td align="center" style="background-color: #CCCCCC; color: #333333;">
	          <div align="left">
	            <?php
		}
		
		echo "<align=\"left\"><valign=\"top\">".$list_day;
		
 
 
$Q1 = mysql_query(sprintf("SELECT * FROM `events` WHERE `date` > '%s' AND `date` < '%s' AND `day` = '%s';", $tm, $tp, $list_day));
while ($D1 = mysql_fetch_assoc($Q1)) {
 
 
 
 echo "<p align=\"left\" class=\"style2\">".stripslashes($D1['title'])."->".$D1['type']. "<br></p>"; 
 
 }
 
		echo '</td>';
 
		if ($theday == 6) {
			echo '</tr>';
			echo '<tr class="rows">';
			$theday = -1;
		}
	$theday++;
}
?>	
    </div>    </tr>
</table>
 
</center>
</body>
</html>
[+][-]07/14/08 03:39 PM, ID: 22002746Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/14/08 03:41 PM, ID: 22002758Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: PHP Scripting Language, PHP for Windows, JavaScript
Sign Up Now!
Solution Provided By: hielo
Participating Experts: 3
Solution Grade: B
 
[+][-]07/14/08 03:41 PM, ID: 22002766Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/14/08 03:43 PM, ID: 22002774Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/14/08 03:43 PM, ID: 22002777Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/14/08 03:50 PM, ID: 22002810Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/14/08 03:56 PM, ID: 22002834Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07/14/08 04:01 PM, ID: 22002857Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/14/08 04:03 PM, ID: 22002875Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/14/08 04:08 PM, ID: 22002899Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/14/08 07:42 PM, ID: 22003788Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81 / EE_QW_2_20070628