>
>OK, sorry to ask this once again, but I'd like to see (verbatim
>please, attachments preferred):
>
>- the page code where you update the article
>- the page code where you fetch the article(s)
>- $ echo 'select * from article where id=69;' | mysql -umidgard -pmidgard 
>midgard
>- $ echo 'select * from topic where id=21;' | mysql -umidgard -pmidgard 
>midgard
>
>Bye,
>Emile

Attached is mysql.txt, annotated log of me doing the dumps...

Here is the edit page... would not attach properly.

<?      if($isaction == "1") { 
                //Delete
                if($whichaction=="delete") {
                        //Delete the selected article.
                        if(mgd_delete_article($whicharticle)) {
                           ?> Article Deleted. <?
                        } else {
                           ?> Could not delete! Eek! <?
                        }
                        ?>  <?
                }
                if($whichaction=="modify") {
                        //Give us the modify screen
                        ?>
<?
        if($done=="1") { ?> Done. <? } else {
        $article     = mgd_get_article($whicharticle);
        $topic       = $article->topic;
        $name        = $article->name;
        $title       = $article->title;
        $abstract    = $article->abstract;
        $content     = $article->content;
        $author      = $article->author;
        $url         = $article->url;
        $startdate   = $article->startdate;
        $caldays     = $article->caldays;
        $icon        = $article->icon;
        $view        = $article->view;
//        $print       = $article->print;
        $extra1      = $article->extra1;
        $extra2      = $article->extra2;
        $extra3      = $article->extra3;
        }
        if($done == "1") {
                echo "[";
                echo $whicharticle;
                echo "][";
                echo $topic;
                echo "][";
                echo $icon;
                echo "]";
               $res = mgd_update_article($whicharticle, $topic, $name, $title,
 $abstract, $content, $author, $url, $calstart, $caldays, $icon, $view, 
$print, $extra1, $extra2, $extra3); 
?> Article updated (&(res);). Click <a href = "&(id);.html?action=admin">here</a> 
to go back to the admin page.
<? } else { ?>
Modify the article, then click the submit button when you are finished.<p>

<form action="&(id);.html" method=post>

          <input type="hidden" name="topic" value="&(id);">
       <input type="hidden" name="whicharticle" value="&(whicharticle);">
       <input type="hidden" name="isaction" value="1">
       <input type="hidden" name="action" value="articleaction">
       <input type="hidden" name="done" value="1">
       <input type="hidden" name="whichaction" value="modify">
       Title: <input name="title" value="&(title);">
       Author: <input name="name" value="&(name);">
       <p>
       <input type=submit>
       Abstract:
       <textarea name="abstract" rows="5" cols="60" wrap="soft">
&(abstract);
</textarea><p>
       Content:
       <textarea name="content" rows="10" cols="60" wrap="soft">
&(content);
</textarea><p>
       
</form>

<?
}               } 


        } else { ?>

Please select an action to perform on one of your articles.<p>
<hr>

<form action="/teacher/tadmin/&(id);.html" method = post>

<input type=hidden name=action value="articleaction">
<input type=hidden name=isaction value="1">
Select which article:

<select name="whicharticle" size="10">
<!-- Fetch the file list-->
<?   $article = mgd_list_topic_articles_all( $id );
     if ($article) for ($i = 0; ($i < 100) && $article->fetch(); $i++) { 
                if($article.type  < 2) { ?>
                        <option value="&(article.id);"> &(article.title); </option>
                <? } 
     } ?>
</select>

<p>
Select action:
<select name="whichaction">
<option value="modify">Modify</option>
<option value="delete">Delete</option>
</select>
<p>
Click here when all the other options are selected.
<input type="submit" value="Go!">
</form>

<? } ?>

Here is the fetch page(same problem):

<? $myarticle = mgd_get_article ($article); ?>

<h1>&(myarticle.title);</h1>

<p class="abstract">
&(myarticle.abstract);</p>
<? if($myarticle->type == 1) { ?>
&(myarticle.content:h);
<? } else { ?>
&(myarticle.content);
<? } ?>
<p align = "right">
<a href="/teacher/&(id);.html?action=index">Home</a>.
</p>

Apologies for the length of the message...

Ben Garney
LHS Webmaster
www.lincolnhs.pps.k12.or.us 
   
IMPORTANT NOTICE:  If you are not using HushMail, this message could have been
read easily by the many people who have access to your open personal email messages.
Get your FREE, totally secure email address at http://www.hushmail.com.


--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org

To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]

Reply via email to