Jump to content

marhoons

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Everything posted by marhoons

  1. my primary indexes & display the article by id .. i'm asking if there's any specail function to identfy the next & prv. pointer! thanks again and hope to hear good way... already this fourms using whats i want to do it!
  2. thanks again.... come with me... i display article has Id 8 by this syntax: $sql= mysql_query("select * from articles where id='8' "); $row= mysql_featch_array($sql); . . . . . . . in this case how i know the next & previous article (recored)?
  3. no my dear i dont meant pagination.... see: I mean if i display the article has id: 8 the next article should be 4 as my draw figure. and the previous should be 5. again i did not mean pagination... thanks for fast reply.
  4. Dear all, good day to you.. it is any way to know the Next & previous ID after the current record? i draw a simple scenario: please advice and guide me. Thanks, Yours M a r h o o n
  5. hello dears, my problem is someone or more than one; trying attack my website by opening my dynamic pages (working through database) more than 100 times per min and refreshing that pages during a day, that mean causing to consuming my limit queries on server & killing the database connection (chocking) & exceeding the bandwidth and causing the huge traffics. from the statics my daily visitor average is 28000 Hits before but in last 4 days ago up to 48000 Hits that mean there is something up normal as I checked the logs on my root I deduce that traffic comes from same destination with same URL (duplicated), that mean he is refreshing the page!. i Modified my script by using cookies to close all connection if he refreshing the page in more than 5 times per min, but that isn't the finle suluation if he disable the cookies from his browsers my modifed isn't useful. $_SESSION["str_attack"] = 1; if (!$_COOKIE["timerv"]) { setcookie("timerv","1"); } else { $h= $_COOKIE["timerv"] +1; setcookie("timerv",$h); } if ($current_time % 2 ==0) { if (isset($_SESSION["str_attack"]) && $_COOKIE["timerv"] > 5) { setcookie("timerv",""); print "<script>self.close();</script>"; exit(); } } please.. advice me! need your help brothers...
  6. hello dears, my problem is someone or more than one; trying attack my website by opening my dynamic pages (working through database) more than 100 times per min and refreshing that pages during a day, that mean causing to consuming my limit queries on server & killing the database connection (chocking) & exceeding the bandwidth and causing the huge traffics. from the statics my daily visitor average is 28000 Hits before but in last 4 days ago up to 48000 Hits that mean there is something up normal as I checked the logs on my root I deduce that traffic comes from same destination with same URL (duplicated), that mean he is refreshing the page!. i Modified my script by using cookies to close all connection if he refreshing the page in more than 5 times per min, but that isn't the finle suluation if he disable the cookies from his browsers my modifed isn't useful. $_SESSION["str_attack"] = 1; if (!$_COOKIE["timerv"]) { setcookie("timerv","1"); } else { $h= $_COOKIE["timerv"] +1; setcookie("timerv",$h); } if ($current_time % 2 ==0) { if (isset($_SESSION["str_attack"]) && $_COOKIE["timerv"] > 5) { setcookie("timerv",""); print "<script>self.close();</script>"; exit(); } } please.. advice me! need your help brothers...
  7. I have been Googling for a bit now as to how to let the user save the current page via a 'clickable icon' to an HTML file (i.e., on the client side. that i mean !
  8. Hello, how we can generate Save As function for save an article for example. I now we can create an temp. html in somewear and calling the header download function! but I am asking is there direct way to save as the page? thanks
  9. $body = include("login_form.php"); but the out put will be define in $body variable!
  10. Hi every body, when I have a media file grater than 5.44 MB I missing some byte in download with header function I don't know what exactly problem, so look at my code and any commants please? <? include("connect/config.php"); $id= intval($_REQUEST["id"]); $sql1= mysql_query("select * from $tsound where id='$id' ") or die("Error1"); $row1= mysql_fetch_array($sql1); $sql2= mysql_query("select * from $tsound2 where id='$row1[mtype]' ") or die("Error2"); $row2= mysql_fetch_array($sql2); $file= "media/$row2[mkdirs]/$row1[mpath]"; $len = filesize($file); $filename = basename($file); $stype = strtolower(substr(strrchr($filename,"."),1)); if ($stype=="mp3") { $ctype="audio/mpeg"; } else if ($stype=="wmv") { $ctype="video/x-ms-wmv"; } else { $ctype="audio/x-ms-wma";} header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: public"); header("Content-Description: File Transfer"); header("Content-Type: $ctype"); $header="Content-Disposition: attachment; filename=".$row1[mtitle].";"; header($header); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".$len); @readfile($file); exit(print"<script>self.close(); <script>"); ?>
  11. Hello guys, I want ask you if u know how i can add Javascript library such as php editors.. when i want write javascript cood i want Dream. help me to write the special function.. this an example if i write php code.. I think I saw that in golive.. It's possible to adding this library in Dreamvever? Thanks alot..
  12. hello, I want ask about reading directory I mean if i have some files in directory name: X and I have in 1.zip , u.jpg x ====> name of folder 1.zip, u.jpg =====> are contents How i can identify contents by php code.. I dont ask about existing or how to print it I am asking generally see the e.g: ------ you have in direcory x : - 1.zip - u.jpg ------ Thanks for help
  13. it's not work my darling.. Nothing replace....!
  14. Thanks.. But we have big prob. how i can catch the url in code to clean it! sach as: <P class=MsoNormal dir=rtl style="MARGIN: 0cm 0cm 0pt"></P> <P class=MsoNormal dir=rtl style="MARGIN: 0cm 0cm 0pt"> <A name=4> <SPAN lang=AR-IQ>Test</SPAN></A><SUP><SPAN lang=AR-IQ>(<span class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><sup><span lang=AR-IQ> <a title="" style="mso-footnote-id: ftn4" href="http://localhost/eassy/control/article.php?cat=25#_ftn4" name=_ftnref4><span dir=ltr style="mso-special-character: footnote"><sup> <span style="FONT-SIZE: 13pt; FONT-FAMILY: 'Simplified Arabic'; mso-ascii-font-family: 'Simplified Arabic'; mso-fareast-font-family: 'Times New Roman'; mso-hansi-font-family: 'Simplified Arabic'; mso-bidi-language: AR-IQ; mso-ansi-language: EN-US; mso-fareast-language: EN-US">[4]</span></sup></span></a></span></sup></span>)</SPAN></SUP><SPAN lang=AR-IQ>: <o:p></o:p> </SPAN></P> <P class=MsoNormal dir=rtl style="MARGIN: 0cm 0cm 0pt"><SPAN lang=AR-IQ>"إِذا example..example..example.example..example..example..example..example..example..example <o:p></o:p> </SPAN></P> <P class=MsoNormal dir=rtl style="MARGIN: 0cm 0cm 0pt"><SPAN lang=AR-IQ> <o:p> </o:p> </SPAN></P> How i can catch url and replace with out affect in code!
  15. hello... use..: <?php // img need reassimple $filename = '1.jpg'; // get new imag time stamp name $tt= time(); $t="$tt.jpg"; // Set a maximum height and width $width = 400; $height = 500; // Content type header('Content-type: image/jpeg'); // Get new dimensions list($width_orig, $height_orig) = getimagesize($filename); $ratio_orig = $width_orig/$height_orig; if ($width/$height > $ratio_orig) { $width = $height*$ratio_orig; } else { $height = $width/$ratio_orig; } // Resample $image_p = imagecreatetruecolor($width, $height); $image = imagecreatefromjpeg($filename); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig); // Output imagejpeg($image_p, $t, 100); ?> check it please...
  16. Hello, I use Editor (WYSIWYG) To add an article.. any way the problem become if i use Microsoft Word with footnote he has attach the admin url! sach as: http://localhost/eassy/control/article.php?cat=12 I need to clean that url above.. I can use : $replac=str_replace("http://localhost/eassy/control/article.php","",$txt); But i have alot of section (?cat=12,?cat=105,......) it not possible way to write all url's section to clean it! what i can do for that any one have an idea..? or how i can remove an url until the #! Like.. href="http://localhost/eassy/control/article.php?cat=12#_ftn4" after clean become href="#_ftn4" Thanks alot,
  17. Hello, i use WYSIWYG editor ver. 2.03 and i am confortable with it ..to day i want to do some medication by adding function word cleaner code.. However.. [color=red]i was found function to clean word code post but i dont now how to use it ! any way if we have botton name (past) for i.e when i copy text from microsoft word How i can use this function to clean it!?[/color] [code] // The following function is a slight variation of the word cleaner code posted function() { var D = this.getInnerHTML(); if (D.indexOf('class=Mso') >= 0) { // make one line D = D.replace(/\r\n/g, ' '). replace(/\n/g, ' '). replace(/\r/g, ' '). replace(/\&nbsp\;/g,' '); // keep tags, strip attributes D = D.replace(/ class=[^\s|>]*/gi,''). //replace(/<p [^>]*TEXT-ALIGN: justify[^>]*>/gi,'<p align="justify">'). replace(/ style=\"[^>]*\"/gi,''). replace(/ align=[^\s|>]*/gi,''); //clean up tags D = D.replace(/<b [^>]*>/gi,'<b>'). replace(/<i [^>]*>/gi,'<i>'). replace(/<li [^>]*>/gi,'<li>'). replace(/<ul [^>]*>/gi,'<ul>'); // replace outdated tags D = D.replace(/<b>/gi,'<strong>'). replace(/<\/b>/gi,'</strong>'); // mozilla doesn't like <em> tags D = D.replace(/<em>/gi,'<i>'). replace(/<\/em>/gi,'</i>'); // kill unwanted tags D = D.replace(/<\?xml:[^>]*>/g, '').       // Word xml replace(/<\/?st1:[^>]*>/g,'').     // Word SmartTags replace(/<\/?[a-z]\:[^>]*>/g,'').  // All other funny Word non-HTML stuff replace(/<\/?font[^>]*>/gi,'').    // Disable if you want to keep font formatting replace(/<\/?span[^>]*>/gi,' '). replace(/<\/?div[^>]*>/gi,' '). replace(/<\/?pre[^>]*>/gi,' '). replace(/<\/?h[1-6][^>]*>/gi,' '); //remove empty tags //D = D.replace(/<strong><\/strong>/gi,''). //replace(/<i><\/i>/gi,''). //replace(/<P[^>]*><\/P>/gi,''); // nuke double tags oldlen = D.length + 1; while(oldlen > D.length) { oldlen = D.length; // join us now and free the tags, we'll be free hackers, we'll be free... ;-) D = D.replace(/<([a-z][a-z]*)> *<\/\1>/gi,' '). replace(/<([a-z][a-z]*)> *<([a-z][^>]*)> *<\/\1>/gi,'<$2>'); } D = D.replace(/<([a-z][a-z]*)><\1>/gi,'<$1>'). replace(/<\/([a-z][a-z]*)><\/\1>/gi,'<\/$1>'); // nuke double spaces D = D.replace(/  */gi,' '); this.setHTML(D); this.updateToolbar(); } }; [/code]  any one can help me please don't hesitate..
  18. Hello.. I want any Honey to explain to me or write some code to do this Job.. ::) I want to use quick insert sentence Like: Botton (H).. if i press botton(H) where is the pointer & insert (Hello..) My target is great some Shortcut of sentences are used most of the time.. for i.e: Botten(H) ===> Hello My darling Botten(G) ===> Good Morning Botten(S) ===> See You later ;D But don't forget we don't need cleear all text in textarea.. Thanks for all.. any one have idea to help me.. ?!
×
×
  • 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.