Jump to content

lmcm2008

Members
  • Posts

    23
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

lmcm2008's Achievements

Member

Member (2/5)

0

Reputation

  1. Yeah. In any case right now is working in all navigators, but I lost it in phones and Ipads.... Any advice to fix this??? Thanks. Regards
  2. I´ve change all the <?= $variable ?> to <? echo $variable ?> and also move this lines <script type="text/javascript"> swfobject.registerObject("FlashID"); </script> right under the <object></object> with all the code inside... And works in all navigators!!... Great!!! But... now doesn´t do it in mobiles phones and ipads... jeje... Can you help me now with this matter? just to adapt the code to mobile phones and Ipads? Or its not possible? How can I do it? Thanks a lot to everybody!
  3. Hi: I have a wordpress, and I want to publish a flash animation. I´ve modified the wordpress file sidebar.php with a include to this code in another .php file, but I don´t see nothing, but I don´t have any error... just "white space" instead the animation... Can you help me with the code?? <? $wmode = "opaque"; $refererId = 258; $bannerId = 210; $width = 250; $height = 250; $link = "http://www.bellross.com/index.php?bannerId=".$bannerId."&refererId=".$refererId; $flashLink = "http://www.bellross.com/index.php?bannerId=".$bannerId."%26refererId=".$refererId; ?> <style type="text/css"> body, object { padding:0; margin:0; } #timekeeper, .link { width: <?= $width?>px; height:<?= $height?>px; } .hand { bottom: 0px; left: 107px; } </style> <link href="wp-content/themes/sahifa/template/style.css" rel="stylesheet" type="text/css"/> <script type="text/javascript"> window.onload = function() { if(document.getElementsByTagName('body')[0].style.MozTransform == '' || document.getElementsByTagName('body')[0].style.WebkitTransform == '' || document.getElementsByTagName('body')[0].style.OTransform == '' || document.getElementsByTagName('body')[0].style.transform == '') { function hand() { handS.style.MozTransform = handS.style.WebkitTransform = handS.style.OTransform = handS.style.transform = 'rotate(' + (time * 6) + 'deg)'; handM.style.MozTransform = handM.style.WebkitTransform = handM.style.OTransform = handM.style.transform = 'rotate(' + (time / 10) + 'deg)'; handH.style.MozTransform = handH.style.WebkitTransform = handH.style.OTransform = handH.style.transform = 'rotate(' + (time / 120) + 'deg)'; } var handH = document.getElementById('handH'); var handM = document.getElementById('handM'); var handS = document.getElementById('handS'); var timekeeper = document.getElementById('timekeeper'); var d = new Date(); var time = d.getSeconds() + 60 * d.getMinutes() + 3600 * d.getHours(); hand(); setInterval(function() {time = time+0.20; hand();}, 200); setInterval(function() {r = new Date(); time = r.getSeconds() + 60 * r.getMinutes() + 3600 * r.getHours(); hand()}, 10000); } }; </script> <script src="wp-content/themes/sahifa/swf/Scripts/swfobject_modified.js" type="text/javascript"></script> <script type="text/javascript"> swfobject.registerObject("FlashID"); </script> <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="<?= $width?>" height="<?= $height?>"> <param name="movie" value="wp-content/themes/sahifa/swf/timekeeper.swf"> <param name="quality" value="high"> <param name="wmode" value="<?= $wmode?>"> <param name="swfversion" value="8.0.35.0"> <param name="FlashVars" value="clickTAG=<?=$flashLink?>" /> <!-- Cette balise <param> invite les utilisateurs de Flash Player en version 6.0 r65 et ultérieure à télécharger la version la plus récente de Flash Player. Supprimez-la si vous ne voulez pas que cette invite soit visible. --> <param name="expressinstall" value="wp-content/themes/sahifa/swf/Scripts/expressInstall.swf"> <!-- La balise <object> suivante est destinée aux navigateurs autres qu'IE. Supprimez-la d'IE à l'aide d'IECC. --> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="wp-content/themes/sahifa/swf/timekeeper.swf" width="<?= $width?>" height="<?= $height?>"> <!--<![endif]--> <param name="quality" value="high"> <param name="wmode" value="<?= $wmode?>"> <param name="swfversion" value="8.0.35.0"> <param name="expressinstall" value="wp-content/themes/sahifa/swf/Scripts/expressInstall.swf"> <param name="FlashVars" value="clickTAG=<?=$flashLink?>" /> <!-- Le navigateur affichera le contenu alternatif suivant pour les utilisateurs d'un lecteur Flash de version 6.0 ou de versions plus anciennes. --> <div id="timekeeper"> <a href="<?= $link; ?>" target="_blank" class="link"></a> <img src="template/images/handH.png" class="hand" id="handH" alt="heure"/> <img src="template/images/handM.png" class="hand" id="handM" alt="minute"/> <img src="template/images/handS.png" class="hand" id="handS" alt="seconde"/> </div> <!--[if !IE]>--> </object> <!--<![endif]--> </object> Do you see anything wrong? How can I make this work in my page? I hope you can help me. Thanks. Regards
  4. Yess... perfect!! What an idiot error!!!! Sorry and thanks.!
  5. Hi: I have an error that will be very basic, but I don´t see it... I have this first php: <?php session_start(); require ("connecting.php"); require ("searchprofile.php"); connect(); $miuser=$_SESSION['usu']; $supas=$_SESSION['pas']; echo " Welcome: $miuser $supas<br />"; if ( busca_perfil_activo($miuser)==1) { echo "show $miuser<br />"; muestra_perfil($miuser); } else { echo "creating $miuser<br />"; crea_perfil($miuser); } mysql_close(); ?> Ok.... maybe the problem is here: if ( busca_perfil_activo($miuser)==1) { echo "show $miuser<br />"; muestra_perfil($miuser); } else { echo "creating $miuser<br />"; crea_perfil($miuser); } and the function "busca_perfil_activo($miuser) is the following: function busca_perfil_activo($activo) { $sql="SELECT * FROM perfil WHERE USUARIO='$activo' "; $result = mysql_query($sql); $totalreg=mysql_num_rows($result); if($result == 1) { return 1; } else { return 0; } } Why this function always return 0 ?? I have a record that is ok with the search... and will return 1 in that case, but never do it... Why?? Can you help me?? thanks.
  6. Hi. I have a problem and don´t know hot to solve it. I guess is a very basic thing but after fighting with it a whole week, I decide to ask here... The thing is the following: I have a database that I read perfectly, but, in that database, I have a field that can be with content or "came" empty. I want to make this ... If that field came empty, don´t do nothing, else (with content) do the other thing... like this; if ( isset ( myfield )) { // DO THE CONDITION in myfield } else { // DONT DO NOTHING } Is this correct?? How can I check thefield empty or not and do things depending on this condition?? Please, help. Thanks. Regards
  7. Hi: Ok, I made this... $cadena="SELECT * FROM mytable WHERE (TIPO='2')"; $result=mysql_query($cadena) or die(mysql_error()); $totalreg=mysql_num_rows($result); echo "Registros: $totalreg<br>"; // running perfectly the selection... // begin the array $contador=0; while ( $registro=mysql_fetch_array($cadena) ) { $numeros[$contador]=$registro["ID"]; // ID is my field in the database $contador++; } $elementos=sizeof($numeros-1); //debug echo"Elementos: $elementos<br>"; Ok, In the debug line that I make a echo... echo"Elementos: $elementos<br>"; I receive -1 Why??? It seems that the array is looking good.. or not?? How can I be sure that I fill the array correctly and I have all the items that I received from the data base ??? How can I make an echo from all the array to see if is good filled or not?? Please, help...
  8. Hi: I would like to do something really easy, but I never know how to do it. Please help me. I have a data base where I make the selection in this way: $cadena="SELECT * FROM table WHERE (TYPE='2')"; $result=mysql_query($cadena) or die(mysql_error()); $totalreg=mysql_num_rows($result); Ok, here not problem... I get all the registers with that condition.... Now is the problem... I want to make this... ARRAY [1][iD register 1] ARRAY [2][iD register 2] ARRAY [3][iD register 3] and so on until finish when no more registers whave that condition... for example: ARRAY [66][iD register 66] <--- of $totalreg before. So I have 66 (or XXX ) records selected in the array, and know the Id of every register that I selected before. AND NOW... I want to make a random selection on that array and operate with the register of that selection and make a select to the database on the ID register X... Can you help me?? Thanks a lot. Regards
  9. Ok, then, If I do this: SELECT * FROM TABLE WHERE MONTH($mydate)="08"; 08 for example... This will run and return me all the records that I have where the month is 08??? Thanks
  10. HI: I?m trying to make a form to get the results from a database that has an DATE record, but I don?t know how to make it. Is there any function in PHP that calling a select * from TABLE where DATE="08"...? for example?? How can I make this? I need it and don?t know what to do... Can you help me? I need to select by month and by year... Thanks a lot. regards
  11. Hi, great, but I do this: ?> <td width=200> <form method=POST action=abrelibro.php> <input type="hidden" name="id_libro" id="id_libro" value="<?PHP echo $iden; ?>"> <img src=<?php echo $libro ?> border=0> <input type=submit value=Submit> </td> <?php But same result... doesn´t work as I want... I don´t send the $iden to the second page that is the value that I want to receive there... More ideas?? Thanks a lot for your help...
  12. I´m really sorry, but I don´t understand what are you telling me... You say something like this??? echo "<td width=200>"; echo "<form method=POST action=abrelibro.php>"; echo "<input type=hidden name=id_libro id=id_libro value=$iden>"; echo "<img src=$libro border=0>"; echo "<input type=submit value=Submit>"; thanks...
  13. Yeah, you´re right... But the thing that I´m trying to do is, to click in a book, and then with the $iden "(ID)" go to the second file and search all the details of that book in the database... The first page shows all the books and a button for each book.... and clicking in that buttons then go to the second file... I dont like the get version with the url and i´m trying to do it using post and hiddens fields... Maybe using sessions?? I really don´t know and I´m sure is easy but I´m block... More suggestions? Thanks...
  14. I´m receiving allways the number of books in my table... I mean.. If I have 3 books, I receive allways 3.. if I have 30 I receive 30... I know how many books I have... BUT I want to receive the ID of the book where I select to open the file of that book(ID) in the second file... Thanks.
  15. Hi: I´m creating a library code for myself, and I´m trying to create a page that shows all the books that I have in my database, and when I make click in one of them, go to another page and show all the details of that book that I have in my data base... But I don´t know what I´m doing wrong... Can you help me?? My first page code: <form method="POST" action="abrelibro.php"> <table border=0> <tr> <?php // search all the books in the data base... $cadena="SELECT * FROM libros"; $result=mysql_query($cadena) or die(mysql_error()); $totalreg=mysql_num_rows($result); //echo "$totalreg"; $i=0; while ($fila=mysql_fetch_array($result)) { $iden=$fila['ID']; $titulo=$fila['TITULO']; $autor=$fila['AUTOR']; $editorial=$fila['EDITORIAL']; $anio=$fila['AÑO']; $npaginas=$fila['NPAGINAS']; $tipo=$fila['TIPO']; $desc=$fila['DESCRIPCION']; $alta=$fila['FECHA']; $nuevo=$fila['NUEVO']; $imagen=$fila['IMAGEN']; if ( $i % 5 == 0 ) { if ( $i == 1 ) { echo "<tr>"; } else { echo "</tr><tr>"; } } // book image $libro="libros/$imagen.jpg"; echo "<td width=200>"; echo "<input type=hidden name=id_libro id=id_libro value=$iden>"; echo "<img src=$libro border=0><br>$desc"; echo "<input type=submit value=Submit>"; echo "</td>"; $i++; } // del while ?> </tr> </table> </form> And the page that receive the code from the first one... <?php $milibro = $_POST["id_libro"]; echo "Received book: $milibro"; ?> Can you help me, please??? All the codes are when I have connection to the database done and not problem at all !!!!... Thanks a lot. Regards
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.