-4

私の人生では、このスクリプトのどこが間違っているのかわかりません。空白の画面が表示されるだけです。Jumiコンポーネントにこのコードを使用して、これをjoomla 1.5サイトにインストールしました。それはコードですか、それとも 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..“&lt;strong>User</strong>”).  </p>

</div>

    <?php
    $i++;
    }
    ?>

</body>
</html>
4

2 に答える 2

1

関数getItemsでは、SQL ステートメントを実際に実行することはありません$query

于 2012-07-07T17:31:55.110 に答える
0

これは、明らかにデータベース内のユーザーに電子メールを送信する標準的な PHP コードです。このスクリプトはかなり標準的で基本的な要素のみを使用するため、Joomla やその他のフレームワークとは関係ありません。

于 2012-07-07T17:29:47.630 に答える