Login per accedere help
-
allora ragazzi ho un grande problema:
<?php require "pmheader.php"; $answer = (empty($_POST['re'])) ? "" : $_POST['re']; $post_id = (!isset($_GET['post'])) ? "0" : $_GET['post']; echo $header; if($answer == "") { $query = $db->sql_query("select post_text, bbcode_uid from " . POSTS_TEXT_TABLE . " where post_id = \"$post_id\""); $post_text = $db->sql_fetchrow($query); $post = $post_text['post_text']; $post = wap_validate($post,0,1,$post_text['bbcode_uid'],1); $post_text = "$post"; ?> <?php echo $lang['wap_edit']; ?>Messaggio: <input name="re" emptyok="false" maxlength="999" value="<?php echo $post_text; ?>"/><br/> <anchor> <?php echo $lang['wap_post']; ?> <go href="<?php echo append_sid("wapedit.php?re=$(re)&post=$post_id"); ?>" method="post"> <postfield name="re" value="$(re)"/> </go>Edita </anchor> <?php } else { $time = time(); $update_posts = $db->sql_query("update " . POSTS_TEXT_TABLE . " set post_text = \"$answer\" where post_id = $post_id"); $update_text = $db->sql_query("update " . POSTS_TABLE . " set post_edit_time = \"$time\", post_edit_count = post_edit_count +1 where post_id = $post_id"); $last = $db->sql_query("select p.topic_id, t.topic_replies, t.forum_id from " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p where p.post_id = $post_id and t.topic_id = p.topic_id"); $last = $db->sql_fetchrow($last); $start = $last['topic_replies']; $topic = $last['topic_id']; $forum_id = $last['forum_id']; echo sprintf($lang['wap_click_view_post'],"<anchor>","<go href=\"" . append_sid("waptopic.$phpEx?s=$start&topic=$topic&forum=$forum_id&last=1") . "\"/></anchor>"); echo "Clicca <anchor>Qui!<go href=\"" . append_sid("waptopic.$phpEx?s=$start&topic=$topic&forum=$forum_id&last=1") . "\" /></anchor> per vedere il tuo messaggio."; } echo $footer; ?>vorrei che la funzione messaggio comparisse solo secondo questo codice:
if($userdata['session_logged_in'])
{
messaggio e opzione x editare
}else{
accesso impedito---potete aiutarmi???
ho fatto prove ma non vanno...grazie a ki mi aiuterà -
-
-
ti voglio aiutare, ma tu devi aiutare me

postami solo il pezzo di codice incriminato

perchè non ho il tempo di leggerlo tutto scusami ma è un favore che ti chiedo!
-
if( $userdata['user_level'] == ADMIN || $userdata['user_level'] == 2) { <?php echo $lang['wap_edit']; ?>Messaggio: <input name="re" emptyok="false" maxlength="999" value="<?php echo $post_text; ?>"/><br/> <anchor> <?php echo $lang['wap_post']; ?> <go href="<?php echo append_sid("wapedit.php?re=$(re)&post=$post_id"); ?>" method="post"> <postfield name="re" value="$(re)"/> </go>Edita </anchor> } else { echo "non consentito"; }ma non funziona

-
<?php if( $userdata['user_level'] == ADMIN || $userdata['user_level'] == 2) { ?> <?php echo $lang['wap_edit']; ?>Messaggio: <input name="re" emptyok="false" maxlength="999" value="<?php echo $post_text; ?>"/><br/> <anchor> <?php echo $lang['wap_post']; ?> <go href="<?php echo append_sid("wapedit.php?re=$(re)&post=$post_id"); ?>" method="post"> <postfield name="re" value="$(re)"/> </go>Edita </anchor> <?php } else { echo "non consentito"; } ?>prova in questo modo
altrimenti dimmi cosa contengono le variabili $userdata['user_level'] e $userdata['user_level'] stampandole a video
ciao bello 
inoltre dimmi quale errore dà

-
Ciao! Sembra che tu sia interessato a questa conversazione, ma non hai ancora un account.
Stanco di dover scorrere gli stessi post a ogni visita? Quando registri un account, tornerai sempre esattamente dove eri rimasto e potrai scegliere di essere avvisato delle nuove risposte (tramite email o notifica push). Potrai anche salvare segnalibri e votare i post per mostrare il tuo apprezzamento agli altri membri della comunità.
Con il tuo contributo, questo post potrebbe essere ancora migliore 💗
Registrati Accedi