Jump to content

dotkpay

Members
  • Posts

    126
  • Joined

  • Last visited

Everything posted by dotkpay

  1. Hello, I accidentallly deleted several mysql records using a php script before backing up. Is it possible to a see a mysql log of what was deleted whether from php or sql or the local xampp server itself. Thanks in advance.
  2. Hello, I recently lost some data when my pc cashed and I happened to lose the file with database tables for my php program. Now I can't install my program because I dont have the sql statements to structure my db tables. Any ideas how I can form an sql text file without having to go through the php code file by file, line by line? Thanks in advance
  3. Hello, I have been trying to print a div with jqPrint plugin but I always get a blank paper rolling out of my printer. Could anyone please show me why I cant get the div printed. I copied and pasted jquery.jqprint-0.3.js into the head section. Thanks in advance <html> <body> <head> <style type="text/css"> body{ color:#000; font-size:18px; } #printarea{ position:absolute; top:50px; left:10px; } @media print{ #printarea { background-color: white; height: 100%; width: 100%; position: fixed; top: 0; left: 0; margin: 0; padding: 15px; font-size: 14px; line-height: 18px; } } </style> <script type="text/javascript"> // ----------------------------------------------------------------------- // Eros Fratini - eros@recoding.it // jqprint 0.3 // // - 19/06/2009 - some new implementations, added Opera support // - 11/05/2009 - first sketch // // Printing plug-in for jQuery, evolution of jPrintArea: http://plugins.jquery.com/project/jPrintArea // requires jQuery 1.3.x // // Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php //------------------------------------------------------------------------ (function($) { var opt; $.fn.jqprint = function (options) { opt = $.extend({}, $.fn.jqprint.defaults, options); var $element = (this instanceof jQuery) ? this : $(this); if (opt.operaSupport && $.browser.opera) { var tab = window.open("","jqPrint-preview"); tab.document.open(); var doc = tab.document; } else { var $iframe = $("<iframe />"); if (!opt.debug) { $iframe.css({ position: "absolute", width: "0px", height: "0px", left: "-600px", top: "-600px" }); } $iframe.appendTo("body"); var doc = $iframe[0].contentwindow.document; } if (opt.importCSS) { if ($("link[media=print]").length > 0) { $("link[media=print]").each( function() { doc.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' media='print' />"); }); } else { $("link").each( function() { doc.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' />"); }); } } if (opt.printContainer) { doc.write($element.outer()); } else { $element.each( function() { doc.write($(this).html()); }); } doc.close(); (opt.operaSupport && $.browser.opera ? tab : $iframe[0].contentWindow).focus(); setTimeout( function() { (opt.operaSupport && $.browser.opera ? tab : $iframe[0].contentWindow).print(); if (tab) { tab.close(); } }, 1000); } $.fn.jqprint.defaults = { debug: false, importCSS: true, printContainer: true, operaSupport: true }; // Thanks to 9__, found at http://users.livejournal.com/9__/380664.html jQuery.fn.outer = function() { return $($('<div></div>').html(this.clone())).html(); } })(jQuery); </script> <title>Jquery jqPrint Plugin</title> </head> <body> <div> <u>Jquery jqPrint Plugin</u></p> </div> <div id="printarea"> Should Print this Only </div> <script type="text/javascript"> $(document).ready(function(){ $('#printarea').jqprint(); }); </script> </body> </html>
  4. Hello, I have been trying to get background-size to work in internet explorer but failed. I tried using -ms-filter property but couldn't get it to work, any ideas what I should do? Thanks in advance
  5. Hello, Am trying to position a png image on a jquery popup so that it will act as a close button. The button should protrude out of the popup at the top right corner. So how should I position this png image from the css layout file without having to include it in my html content. Remember the main popup frame which is actually <div> has other child elements with content. So how do I make this button a direct child of the popup frame and not its other child elements. Thanks in advance.
  6. Hello, I have been developing a website that uses the jquery .load function to open files inside <div> tags of the main page. All works well on my local server but I get problems when I upload to my host. Some links in a particular folder do not open inside the <div> tags and information is not displayed whereas other links work normally. What do you think is the problem after uploading? Thanks in advance.
  7. Hello, Am writing a php program that is supposed to send data (POST or GET) to a remote website and get a reply. Should I use curl or should I just load the remote file with GET variables inside a <div> using jquery?
  8. Am trying to load different pages into one main index page.
  9. Yes, Am trying to send arguments to .load just like a normal js function works so that I can have many items calling the same .load instance Currently you would need a different .load function for every call.
  10. Hello, I have been trying to use a js function to call the jquery load utility. This helps me prevent multiple load items on the same page since the single load will be using variables passed on from html. So incase I have a page like the one below, how do I go about this... <html> <head> <script src="http://code.jquery.com/jquery-latest.min.js"></script> </head> <body> <button id="button">click</button> <div id="area"></div> <script type="text/javascript"> $(document).ready(function() { $('#button').click(function() { $('#area').load('example.html'); }); }); </script> </body> </html> Place your own file in the example.html spot Thanks in advance
  11. Thanks Jcbones, you saw this thread through all by yourself. 3 days of barcoding...
  12. Unfortunately the above script can't display the encoded text below the barcode, I run into similar code at http://www.techrepublic.com/article/add-barcodes-to-your-web-apps-using-pear-and-php/5692389 but looks like it needs configuring just like the one I first posted cause it displays only errors. Someone please tell me what's wrong... <?php require_once("Image/Barcode/Code39.php"); $code = 56364357543745; $bc = new Image_Barcode_Code39('',2,4); $bc->draw($code, 'png', true, 120); ?>
  13. Thanks Jcbones, Ican see the barcode now. And does error_reporting(0) turn off the errors for just the script or...
  14. The script is processed exactly the way I posted it in this topic, I can't get it to work even when I comment the header line. I was wondering if it worked when you run it on your local server, @Jcbones
  15. Hello, I have been trying to get my script to draw a barcode but it always outputs a message saying "the image cannot be displayed because it contains errors". I have googled the problem and it seems to be about the headers, I also made sure the "extension=php_gd2.dll" is not commented in php.ini. Could anyone please let me know why this script from pear.php.net can't draw a barcode on my xampp 1.7.7 with php 5.3.8 <?php require_once("Image/Barcode.php"); header("Content-type: image/png"); Image_Barcode::draw('1234', 'Code39', 'png'); ?>
  16. Hello, I have been trying to replace a variable's value inside a function in case it matches a certain criteria but I can't seem to get it right. Let me give an example: <?php function replace_value($obj) { if($obj==1) { $obj=2; } } $number = 1; replace_value($number); echo $number; So how do I go about making $number = 2, because it still has a value of 1 even after I pas it through the function replace_value.
  17. You said yes, but to which example, the first or second?
  18. Hello, Am a little puzzled on how to effectively determine if a character exists in a string. I am trying to come to grips with the function strpos but its a little confusing. If am searching for an underscore in a string and want to echo yes if the string contains an underscore, would the code below be right? Would it be right to exclude booleans TRUE and FALSE Example 1 <?php $string = "Hello_World"; if(strpos($string, "_")) { echo "yes"; } OR do I have to include the booleans TRUE/FALSE Example 2 <?php $string = "Hello_World"; if(strpos($string, "_") == TRUE) { echo "yes"; }
  19. Thanks Thorpe, So you think I should take a chance and distribute an encoded executable with allow_url_fopen enabled and hope none of my users is that good a hacker or is CURL a better option.
  20. Because the application will be run as a compiled executable on users' desktops. Decoding the script from an exe format back to the source is next to impossible but a very skilled hacker can decode only a small part of it, most probably the part with the credentials and gain access to the remote database. It would work to store the credentials locally if the application is to be hosted on a web server as well but its potentially hazardous in a desktop environment.
  21. Hello, Am writing a script that is supposed to connect to a remote database without having the credentials (host, user & password) written in the code itself. There are two ideas I picked up from the net and the first is to enable allow_url_fopen in the remote server's php.ini and then have a file with the database credentials that I can fopen with this script and read from it then connect to the database on that same server. But am afraid this might be a security gap since anyone with that file's address will be able to read from it and connect to the database. Is the allow_url_fopen method really secure? The other means is CURL but I am not sure it will work well with my current structure. Please advise me on the best means to connect to this database. Thanks in advance.
  22. Hello, I am working on a layout that includes a glass effect and border radius. The effects work in all browsers except internet explorer. The code below is of a transparent glass box on an orange background but you just see a frame with no round corners in IE. The extra css code with 'rgba' colors is just additional background colors which are supposed to be controlled by a javascript function to display random backgrounds but that isn't necessary as I need just one background color. Could you please make my code compatible with IE so that it produces the same effect just like in firefox and opera. <html> <head> <style type="text/css"> body { background-color:orange; } #area { position:absolute; z-index:2; width: 300px; height: 300px; margin: 0 0 0 0; padding: 0; border: 1px solid rgba(0,0,0,0.5); border-radius: 10px 10px 10px 10px; background: rgba(0,0,0,0.25); box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 1px rgba(255,255,255,0.3), inset 0 10px rgba(255,255,255,0.2), inset 0 10px 20px rgba(255,255,255,0.25), inset 0 -15px 30px rgba(0,0,0,0.3); -o-box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 1px rgba(255,255,255,0.3), inset 0 10px rgba(255,255,255,0.2), inset 0 10px 20px rgba(255,255,255,0.25), inset 0 -15px 30px rgba(0,0,0,0.3); -webkit-box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 1px rgba(255,255,255,0.3), inset 0 10px rgba(255,255,255,0.2), inset 0 10px 20px rgba(255,255,255,0.25), inset 0 -15px 30px rgba(0,0,0,0.3); -moz-box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 1px rgba(255,255,255,0.3), inset 0 10px rgba(255,255,255,0.2), inset 0 10px 20px rgba(255,255,255,0.25), inset 0 -15px 30px rgba(0,0,0,0.3); } </style> </head> <body> <div id="area"> <p> This is a Glass box with round corners. </div> </body> </html> Thanks in advance
  23. Hello, I have been trying to come up with bar codes in php to represent integers for example 7432973853. How do I get a bar code for a particular string of numbers?
  24. Hello, Am trying to get the time with microseconds but the date("u") function returns six zeroes. How do I get it to return the real microseconds or even better, Can I get milliseconds in php?
×
×
  • 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.