对于我的一生,我无法弄清楚这个脚本哪里出了问题。它只是显示一个空白屏幕。我已经将它安装在 joomla 1.5 站点上,并在 Jumi 组件中使用此代码。是代码还是 Jumi/Joomla?任何帮助将不胜感激!谢谢。
<html>
<head>
<?php
// RETURN LIST OF DATA ROWS
function getItems($query) {
// Initialize variables
$result = null;
// Get a reference to the database
$db = &JFactory::getDBO();
// Get Current User
$user = &JFactory::getUser();
$user_email = $user->email;
// Set the Query
$query ="SELECT * FROM my_table WHERE owneremail = '$user_email'";
$num=mysql_numrows($result);
mysql_close();
?>
</head>
<body>
// REPLACE TEMPLATE FIELDS WITH ACTUAL VALUES
<?php
$i=0;
while ($i < $num){
$f1=mysql_result($result,"firstname");
$f2=mysql_result($result,"lastname");
$f3=mysql_result($result,"street_num");
$f4=mysql_result($result,"street");
$f5=mysql_result($result,"apt");
$f6=mysql_result($result,"city");
$f7=mysql_result($result,"postcode");
}
?>
<div>
<div style="text-align: center; font-weight: bold; font-size: 14px; font-family: Arial, Helvetica, sans-serif;"><p><strong>Customer Welcome Letter</strong></p>
</div>
'<div style="line-height:15px;"><p><strong>Hello <?php echo $f1; ?> <?php echo $f2; ?></strong> <br>
<br>
<strong>Here are your details: <span style="border: 1px dashed #CFF; padding-left: 6px; padding-bottom: 3px; padding-right: 3px; padding-top: 3px; background-color: #FFC;"><?php echo $f3; ?> <?php echo $f4; ?> <?php echo $f5; ?> <?php echo $f6; ?>, CO <?php echo $f7; ?></span></strong>(AKA..“<strong>User</strong>”). </p>
</div>
<?php
$i++;
}
?>
</body>
</html>