DieseL Posted February 19, 2013 Report Share Posted February 19, 2013 Sveiki visiem! Tātad, es gribu izveidot mainīgo funkciju IPB 2.3.6 skriptam, gribu lai beigās rādās ikona ar dažādām bildēm, piemērām kad topiks ir slēgts tad lai rāda vienu bildi, bet kad topiks atvērts tad citu bildi! Izmēģinājos dažādi, bet pie rezultātiem nēsmu ticis, varbūt spēsiet palīdzēt! Šī ir tā skripta daļa kur jau izvada visu un apakša veidoju tos mainīgos, nezinu vai uz īsto pusi vispār... echo ' <div id="ramis"> <a style="text-decoration:none; color:black;" href="'.$forum.'/index.php?showtopic='.$id.'&view=getnewpost" > <div style=" border-bottom:1px solid #000000; height: 25px; float:left; width: 25px; border: 1px solid rgb(170, 170, 170); padding: 1px;"> <img src="'.$userAvatar.'" width="25px;" height="25px;"></div> <div style=" border-bottom:1px solid #000000; height: 25px; float:right; width: 25px; border: 1px solid rgb(170, 170, 170); padding: 1px;"> '.$state.'</div> <span style="text-decoration:none; font-size:11px;font-weight:bold; text-align:left; margin-left:5px; color:#b20000;"> <img src="images/arrow.png" /> '.$title.'</span><br> <span style="margin-left:5px;"> <img src="images/arrow.png" />Autors: <span style="color:gray">'.$row[starter_name].'</span></span> <span style="margin-left:3px;"> Atbildēja: <span style="color:gray">'.$row[last_poster_name].'</span></span></a> </div> '; } if (mysql_query($state) == "open") { echo ' <img src="images/open.png" /> '; } if (mysql_query($state) == "closed") { echo '<img src="images/open.png" /> '; } ?> Quote Link to comment Share on other sites More sharing options...
Pats Toms Posted February 19, 2013 Report Share Posted February 19, 2013 http://php.lv/f/topic/20537-ipb-314/?p=160207 Quote Link to comment Share on other sites More sharing options...
DieseL Posted February 19, 2013 Author Report Share Posted February 19, 2013 http://php.lv/f/topic/20537-ipb-314/?p=160207 Kāds sakars tam tematam ar manu jautājumu? Quote Link to comment Share on other sites More sharing options...
rpr Posted February 19, 2013 Report Share Posted February 19, 2013 tad palasi mysql_query() funkcijas aprakstu un tad paprasti sev kāpēc resursu salīdzini ar stringu un ja vari atbildēt, tad neej uz iesācēju sadaļu. Quote Link to comment Share on other sites More sharing options...
Kemito Posted February 20, 2013 Report Share Posted February 20, 2013 http://php.net/manual/en/function.mysql-query.php Un tagad pats paskaties, ko funkcija atgriež un ar ko tu salīdzini. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.