Jump to content

gwolff2005

Members
  • Posts

    186
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

gwolff2005's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. Hi guys, I need your help. My website was working fine. On my page (guntmarwolff.com) I have amongst other things a small teaser for my wordpress blog (left bottom) (which is on another site). As I said everything is working fine, Then I installed wp touch on my blog site ( a plugin which detects if a mobile device enters the blog page). Since then I get this error message. Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/w010930a/index.php:3) in /www/htdocs/w010930a/blog/wp-content/plugins/wptouch/core/class-wptouch-pro.php on line 404 When I deactivate the plugin the error message is gone.But for obvious reasons I need teh plugin. So what do I need to do. Tried already to delete all empty spaces. Did not help. Funny thing. While writing this, the error is gone in firefox but still there in chrome and IE. The error was as well shown to me yesterday evening and then after refreshing it dissappear until this morning... But at the same time the error is shown on other devices as well. So it is not because of my settings. Here is the code around index.php:3 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> <?php if(isset($_GET['mVar'])){ session_start(); $_SESSION['views']=1; // Declaring a session to track the visits } if(!$_SESSION['views'] == 1){ // Checking the session and doing the redirection and here is the code around class-wptouch-pro.php:404 } } if ( !isset( $_COOKIE[ WPTOUCH_CACHE_COOKIE ] ) || ( isset( $_COOKIE[ WPTOUCH_CACHE_COOKIE ] ) && $_COOKIE[ WPTOUCH_CACHE_COOKIE] != $cookie_value ) ) {setcookie( WPTOUCH_CACHE_COOKIE, $cookie_value, time() + 3600, '/' ); $_COOKIE[ WPTOUCH_CACHE_COOKIE ] = $cookie_value; } if ( !is_admin() ) { do_action( 'wptouch_cache_page' ); } } Thnaks so much in advance for your help.
  2. @ Mancent. Thanks for the code. I will try it now. I have the popupbox.htm. @Skunkbad: Some of it I pull over from my normal site so I dont have to maintain too much...
  3. Thanks for your input @ ginerjm How would I start the session first, if I want to detect First if it is mobile or not and if yes redirect. If that is not necessary how owuld I code it then? @Mancent: My problem is that the window does not pop up in my code which it is supposed to do.
  4. Hi guys, I need your help, I am very desperate. I want people visitng my site with a mobile browser seeing a window saying, would you liek to switch to mobile view? - and the redirect. I found this code and I tried to implement it in my php fiel but nothing changes. Mobile borwser goes immediately to mobile view without window asking first, * What am I missing or doing wrong. you can test it out on guntmarwolffdotcom Thanks for your help! <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> <?php if(isset($_GET['mVar'])){ session_start(); $_SESSION['views']=1; // Declaring a session to track the visits } if(!$_SESSION['views'] == 1){ // Checking the session and doing the redirection if ($_SERVER["QUERY_STRING"] == null){ echo " <script type=\"text/javascript\"> if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { window.location.replace('http://m.guntmarwolff.com');} </script> "; } } ?> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.js"></script> <!-- Add fancyBox main JS and CSS files --> <script type="text/javascript" src="http://www.guntmarwolff.com/fancyapps-fancyBox-v2.1.5-0-ge2248f4/source/jquery.fancybox.js"></script> <link rel="stylesheet" type="text/css" href="http://www.guntmarwolff.com/fancyapps-fancyBox-v2.1.5-0-ge2248f4/source/jquery.fancybox.css" media="screen" /> <script type="text/javascript" jQuery(document).ready(function () { jQuery.fancybox({ 'width': '75%', //Use percentage to maintain responsiveness 'height': '75%', 'autoScale': true, 'transitionIn': 'fade', 'transitionOut': 'fade', 'type': 'iframe', 'href': 'popupbox.htm' }); }); </script>
  5. Hi guys thanks for your help. my divs were quite a mess. So I took the div completely out and voila... Thanks again!!
  6. Hi guys, I need your help please. i worked on my site and everything looks fine apart from two divs. They appear in IE and FF fine but not in Chrome (see picture attached). First picture show in FF and IE which is correct the second one in chrome. The red CIRCLES (not the square) are the problems. The code for the facebook div is: <div class="fb-share-button" div style="position:relative;top:-50px;left:690px;z-index:4; width:345px; float:right;" data-href="http://www.guntmarwolff.com" data-type="button_count"></div> </div> The code for the picture div is: <div style="position:relative;top:85px;left:0px;z-index:5000px;"><script type="text/javascript"> var imlocation = "images/"; var currentdate = 0; var image_number = 0; function ImageArray (n) { this.length = n; for (var i =1; i <= n; i++) { this[i] = ' ' } } image = new ImageArray(3) image[0] = 'main_ad3.jpg' image[1] = 'main_ad4.jpg' image[2] = 'main_ad5.jpg' var rand = 60/image.length function randomimage() { currentdate = new Date() image_number = currentdate.getSeconds() image_number = Math.floor(image_number/rand) return(image[image_number]) } document.write("<img src='" + imlocation + randomimage()+ "'>"); </script></div> What am I doing wrong????? Please help. Thanks!!!!
  7. Hey it works!!!!! Thank you very much!!!!!!! I really appreciate your help. Thank you!
  8. Hi mr Marcus, I did that, godaddy seems to have a mailqueue again, so I cannot see teh results right now. I will let you know as soon as I get the mail. Hopefully it works. Thank you so much.
  9. Hi Mr. Marcus, What do I need to write in order to add it to the mail function. I am on this the whole day already and cannot get it sorted. Thank you so much!!
  10. mrMarcus, I am quite a php beginner, so the only thing I can say: that putting all bits and pieces together it does not show the iP. What do I need to add/change in order for it to works. I really appreciate your help. Thank you.
  11. mrMarcus, kicken, thanks for your help. It is still not sending me the IP In the enmail I get it just says Ip and then blank... while on the internet it shows the ip address.
  12. Hi guys. I need your help. I have a contact form, on which the ip address is shown, but it does not get send with the form, for whatever reason... What am I doing wrong?? Thanks for your help!!! <?php // wenn das Formular übermittelt wurde if(isset($_POST['abschicken'])){ while(list($feld,$wert)=each($_POST)){ // übermittelte Inhalte "entschärfen" $wert=preg_replace("/(content-type:|bcc:|cc:|to:|from:)/im", "",$wert); $feld=$wert; // die übermittelten Variablen werden zum "Text der Email" zusammengefasst if($feld!="abschicken") $mailnachricht.=ucfirst($feld).": $wert\n"; } $mailnachricht.="\nDatum/Zeit: ". date("d.m.Y H:i:s"); $ip=@$REMOTE_ADDR; echo "<input type='hidden' value='$ip' />"; // Ãœberprüfen ob alle Pflichtfelder gefüllt sind empty($vorname) ? $err[] = "<p>- Bitte den Vornamen angeben.</p>" : false; empty($email) ? $err[] = "<p>- Bitte die Email-Adresse angeben.</p>" : false; empty($text) ? $err[] = "<p>- Welchen Wunsch haben Sie? Bitte den Text eingeben.</p>" : false; // wenn nicht, werden die Fehlermeldungen ausgegeben und das "halbgefüllte" Formular angezeigt if(!empty($err)) { echo "<p>Bitte korrigieren Sie folgende Fehler:</p>"; foreach($err as $fehler){ echo $fehler; } ?> <form action="<?php echo $_SERVER['kontakt/PHP_SELF']; ?>" method="post"> <table width="100%" border="0" cellpadding="3" cellspacing="1"> <tr> <td width="140" align="right" class="style18"><div align="left" class="style22">Nachname:</div></td> <td align="left"><input type="text" name="nachname" value="<?php echo $nachname; ?>" style="width:100%;" /></td> </tr> <tr> <td align="right" class="style18"><div align="left" class="style22">Vorname:</div></td> <td align="left"><input type="text" name="vorname" value="<?php echo $vorname; ?>" style="width:100%" /></td> </tr> <tr> <td align="right" class="style18"><div align="left">Firma:</div></td> <td align="left"><input type="text" name="firma" value="<?php echo $firma; ?>" style="width:100%" /></td> </tr> <tr> <td align="right" class="style18"><div align="left">Postanschrift:</div></td> <td align="left"><input type="text" name="strasse" value="<?php echo $strasse; ?>" style="width:100%" /></td> </tr> <tr> <td align="right" class="style18"><div align="left">Telefon:</div></td> <td align="left"><input type="text" name="telefon" value="<?php echo $telefon; ?>" style="width:100%" /></td> </tr> <tr> <td align="right" class="style18"><div align="left" class="style22">E-Mail:</div></td> <td align="left"><input type="text" name="email" value="<?php echo $email; ?>" style="width:100%" /></td> </tr> <tr> <td align="right" class="style18"><div align="left">Ihre IP Adresse</div></td> <td align="left"><input type="hidden" name="ip" value="<?php echo $_SERVER['REMOTE_ADDR']; ?>" style="width:100%" /></td> </tr> <tr> <td colspan="2"><textarea rows="12" style="width:100%" name="text"><?php echo $text; ?></textarea></td> <td></td> </tr> <tr> <td colspan="2" align="left" nowrap><input name="reset" type="reset" style="width:49%" value="Formular löschen" /> <input type="submit" name="abschicken" class="button" value="Formular absenden" style="width:49%" /></td> </tr> </table> <?php // sind keine Fehler vorhanden, wird die Email versendet } else { $mailbetreff="Kontaktformular ".$_SERVER['HTTP_HOST']; // HIER DIE EMPFÄNGER EMAIL-ADRESSE ANPASSEN!!! echo (mail("guntmar@guntmarwolff.com", $mailbetreff, $mailnachricht, "From: $email")) ? "<p>Vielen Dank für Ihre Email.</p>": "<p>Ein Fehler ist aufgetreten!</p>"; ; } // das Formular welches als erstes dem Besucher angezeigt wird } else { ?> </form> <form action="<?php echo $_SERVER['kontakt/PHP_SELF']; ?>" method="post"> <table width="100%" border="0" cellpadding="3" cellspacing="1"> <tr> <td width="140" align="right" class="style18"><div align="left" class="style22">Nachname:</div></td> <td align="left"><input type="text" name="nachname2" value="" style="width:100%;" /></td> </tr> <tr> <td align="right" class="style18"><div align="left" class="style22">Vorname:</div></td> <td align="left"><input type="text" name="vorname" value="" style="width:100%" /></td> </tr> <tr> <td align="right" class="style18"><div align="left">Firma:</div></td> <td align="left"><input type="text" name="firma" value="" style="width:100%" /></td> </tr> <tr> <td align="right" class="style18"><div align="left">Postanschrift:</div></td> <td align="left"><input type="text" name="strasse" value="" style="width:100%" /></td> </tr> <tr> <td align="right" class="style18"><div align="left">Telefon:</div></td> <td align="left"><input type="text" name="telefon" value="" style="width:100%" /></td> </tr> <tr> <td align="right" class="style18"><div align="left" class="style22">E-Mail:</div></td> <td align="left"><input type="text" name="email" value="" style="width:100%" /></td> </tr> <tr> <td align="right" class="style18"><div align="left">Ihre Ip Adresse:</div></td> <td align="left"><input type="hidden" name="ip" value="" class="style18"> <span class="style18"><?php echo $_SERVER['REMOTE_ADDR']; ?></span></td> </tr> <tr> <td colspan="2"><textarea rows="12" style="width:100%" name="text"></textarea></td> <td></td> </tr> <tr> <td colspan="2" align="left" nowrap><input name="reset" type="reset" style="width:49%" value="Formular löschen" /> <input type="submit" name="abschicken" value="Formular absenden" style="width:49%" /></td> </tr> </table> <!-- bitte lassen Sie diesen Link sichtbar auf Ihrer Seite. Danke! --> <?php } ?> </form> </div>
  13. Hi, I am writing a code in PHP to achieve the date recurrence pattern just like in Microsoft Outlook in Codeigniter Framework. The logic is a course starts every week or every month or yearly. When admin selects current date and weekly or month in the form, it should calculate and return all the rows as output. For example if user say that course starts every week on Monday and occurrence as 20, it should return 20 rows with starting and ending date with course name. For which I created a form with fields: start date, end date and recurrence: weekly monday, tuesday, wednesday, thursday, friday: monthly: yearly and occurrence (please the attach image). and inserted this values into the Mysql database table. I need some help to start with writing the logic to retrieve all the rows with course name with start and end date the values back to user. Thanks in advance! [attachment deleted by admin]
×
×
  • 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.