Jump to content

QuickOldCar

Staff Alumni
  • Posts

    2,972
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by QuickOldCar

  1. I don't see anything wrong with making your own. If there was just one of everything the world would be pretty boring. A lot of projects die and end up doing a lot of work for nothing.
  2. The developer should fix this. Taking a wild guess that they are calling the class PReportException when should be calling SSRSReportException I looked fast through the source code. sample hello world require_once 'SSRSReport.php'; catch(SSRSReportException $serviceExcprion) { echo $serviceExcprion->GetErrorMessage(); } SSRSReport/bin/SSRSReport.php require_once 'SSRSReportException.php'; class SSRSReportException extends Exception { But in \Factory\SSRSTypeFactory.php all throughout code is this throw new PReportException( Try using this SSRSTypeFactory.php file <?php /** * * Copyright (c) 2009, Persistent Systems Limited * * Redistribution and use, with or without modification, are permitted * provided that the following conditions are met: * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * - Neither the name of Persistent Systems Limited nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * * class SSRSTypeFactory */ class SSRSTypeFactory { /** * * @var array */ private static $SSRSTypes = array(); /** * * @var array */ private static $SSRSEnums = array(); /** * To register a SSRS type with factory * @param string $ssrsType */ public static function RegsiterType($ssrsType) { $class = new ReflectionClass($ssrsType); if (! $class->implementsInterface('ISSRSBaseType')) { throw new SSRSReportException("", "Only classes which implements 'ISSRSBaseType' " . "can be registered with SSRSTypeFactory"); } self::$SSRSTypes[$ssrsType] = $ssrsType; } /** * To register an ssrs enum with factory * @param string $ssrsEnum */ public static function RegisterEnum($ssrsEnum) { self::$SSRSEnums[$ssrsEnum] = $ssrsEnum; } public static function CreateSSRSObject($ssrsType, $stdObject) { if (!array_key_exists($ssrsType, self::$SSRSTypes)) { throw new SSRSReportException("", "Requested SSRS Type $ssrsType is not Registered!"); } $class = new ReflectionClass($ssrsType); $object = $class->newInstance(); $object->FromStdObject($stdObject); return $object; } /** * To get the generic type of a type (basic or ssrs) * @param string $type * @return string */ public static function GetType($type) { $retType = 'unknown'; if($type == 'bool' || $type == 'int' || $type == 'DateTime' || $type == 'string' || $type == 'double') { $retType = 'basic'; } else if(array_key_exists($type, self::$SSRSTypes) || array_key_exists($type, self::$SSRSEnums) ) { $retType = 'ssrs'; } return $retType; } } ?>
  3. default pattern in the database is zeros for date What you should do instead is not let anything be added to the database if a POST field is empty First off are you using GET for parcel id and also POST through a form? If the form is used the parcel id would be lost unless you passed it in a hidden value in the form, and then you check it as POST If need to do something odd like this might as well use REQUEST for the parcel id and can pass it back to the form in a hidden value so is always there. This is how I would handle it. You can pass the parcel id back into form as a hidden value. Can also pass the other variables back into the form. EDIT : wrote this before Ch0cu3r's advice, I missed this was an update <?php $errors = array(); if (isset($_REQUEST['parcel_id']) && trim($_REQUEST['parcel_id']) != '') { //can check the expected type as well $parcel_id = trim($_REQUEST['parcel_id']); } else { $parcel_id = ''; } if (isset($_POST['submit'])) { if ($parcel_id == '') { $errors[] = "No parcel id"; } if (isset($_POST['DateAppealReceived']) && trim($_POST['DateAppealReceived']) != '') { $date_appeal_received = trim($_POST['DateAppealReceived']); } else { $errors[] = "No date appeal received"; $date_appeal_received = ''; } if (isset($_POST['BosMeetingDate']) && trim($_POST['BosMeetingDate']) != '') { $bos_meeting_date = trim($_POST['BosMeetingDate']); } else { $errors[] = "No bos meeting date"; $bos_meeting_date = ''; } if (isset($_POST['LateReturnsDate']) && trim($_POST['LateReturnsDate']) != '') { $late_returns_date = trim($_POST['LateReturnsDate']); } else { $errors[] = "No late returns date"; $late_returns_date = ''; } if (isset($_POST['DeterminationNoticeSet']) && trim($_POST['DeterminationNoticeSet']) != '') { $determination_notice = trim($_POST['DeterminationNoticeSet']); } else { $errors[] = "No determination notice"; $determination_notice = ''; } if (isset($_POST['FinalDetermination']) && trim($_POST['FinalDetermination']) != '') { $final_determination = trim($_POST['FinalDetermination']); } else { $errors[] = "No final determination"; $final_determination = ''; } if (isset($_POST['AnalysisRecommendation']) && trim($_POST['AnalysisRecommendation']) != '') { $analysis_recommendation = trim($_POST['AnalysisRecommendation']); } else { $errors[] = "No analysis recommendation"; $analysis_recommendation = ''; } if (isset($_POST['EmailAddress']) && trim($_POST['EmailAddress']) != '') { $email_address = trim($_POST['EmailAddress']); } else { $errors[] = "No email"; $email_address = ''; } if (isset($_POST['PhoneNumber']) && trim($_POST['PhoneNumber']) != '') { $phone_number = trim($_POST['PhoneNumber']); } else { $errors[] = "No email"; $phone_number = ''; } } //end post submit if (empty($errors)) { $db = new ezSQL_mysql(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST); $result = $db->query("UPDATE parcels SET date_appeal_received='" . $date_appeal_received . "', bos_meeting_date='" . $date_appeal_received . "', late_returns_date='" . $late_returns_date . "', determination_notice_sent_date='" . $determination_notice . "', final_determination='" . $final_determination . "', analysis_recommendation='" . $analysis_recommendation . "', email_address='" . $email_address . "', phone_number='" . $phone_number . "' WHERE parcel_id='" . $parcel_id . "'"); if ($result) { echo 'submitted'; } else { echo 'error submitting'; } } else { foreach ($errors as $error) { echo "$error <br />"; } } ?>
  4. Try mysqltuner out, is a perl script for optimizing. Make sure you make a backup of your original file.
  5. Need to work with arrays? This way you can build associative arrays, sort, sort keys or whatever else need to do with it.
  6. You conveyed the idea well. Google sets the x-frame-options response header to SAMEORIGIN So not iframing google as you desire. This problem and others makes iframing other sites not worth the effort. If you want the data all sites use their api's or would have to scrape the content.
  7. Allowing a person to tunnel through your server to visit other sites could get you into trouble, do malicious acts, visit harmful pages or scripts. A web browser makes it possible to view the internet. A browser is a very complicated software application that does many things most are not aware of. I'll explain in simpler terms how a browser works because I have some time. (not including the multitudes of languages,encoding,handling plugins and extensions,networking,storage of cookies,cache,etc) On each persons device or computer they installed a browser. The browser uses the address bar to connect to a web resource using a URI (Uniform Resource Identifier) A URL(Uniform Resource Locator) is a type of URI and is the global address of documents and other resources on the World Wide Web, commonly referred to as a link, hyperlink, web address, website, file location and whatnot. The browser's rendering engine will determine what type of content it is and parse it. Most commonly is rendered html pages along with css style. Javascript interpreter is used to parse and execute javascript code. The rendering engine will start parsing the HTML document and convert elements to DOM nodes in a tree called the "content tree" It will parse the style data in external css files and in style elements The styling information with visual instructions in the HTML is used to create the render tree. The render tree consists of rectangles with visual attributes like color and dimensions. The rectangles are in the right order to be displayed on the screen. Once the render tree is constructed there is a layout process which will give each node the exact coordinates where it should appear on the screen. It will then begin a painting process of the render tree will be traversing each node using the UI backend layer. The UI backend draws basic widgets on the browser like combo boxes, windows, etc What you describe seems the opposite, a browser running on a server and people having access to it, that is not the normal way. Consider the browser as a client side (for you only) tool, it does not go both ways incorporated into websites. Sessions are held each website and only they have control over them. Possibly a browser plugin is more what you are after? https://developer.chrome.com/extensions/getstarted https://blog.mozilla.org/addons/2014/06/05/how-to-develop-firefox-extension/ There are ways to create your own browser and modify it some, but then everyone would have to download it and you would need to keep it current as other browsers do. Browsers are way more complex than what I even described or written information about them. That's the reason why is just a few out there.
  8. This explains the entire process well. http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/
  9. Can take a look at password_hash and password_verify Is even examples there.
  10. If you query a date that don't exist you should output it as zero and also be calculating that into any graphs or usage. No data to me equates to zero usage, correct?
  11. You want to look for tutorials for creating a CMS http://www.elated.com/articles/cms-in-an-afternoon-php-mysql/ http://biglancers.com/blog/tag/php-cms-tutorial-series/ https://phpacademy.org/videos/create-a-cms-with-php Familiarize yourself how it's done, take extra precautions on security I agree with what the two posters above said, I'm trying to give you more of a visual. With the three cms I've created it was much easier and better to me to use php as a template engine, a whitelist controller page to handle includes, custom login and register system, used ckeditor for article submissions. Learning a framework like laravel and use twig as the template engine can speed you along Here are a few laravel built cms others did, am sure can expand/modify them since are opensource, or examine how they went about doing it. http://maxoffsky.com/code-blog/list-cmss-built-laravel/
  12. It's sad that this day and age this is such an issue, should have been one of the first things knocked out over the web. To me all sites should serve utf-* or not even work, but I'm just a peon in the web world. There is absolutely too many types and variations of encoding period!! A while ago it was announced php6 would resolve these issues but it never happened. Kicken answered the questions I try to detect if is utf8 and if isn't do the conversion using iconv
  13. The main issue is people setting page encoding incorrect or invalid characters/improper coding. If you want your data clean you should. I usually try to detect the entire page or text and encode it once using iconv
  14. What you have there is something to use in local applications for windows. You should look into an application server for server side although would have to be done with something like java. You should try to make yourself a REST API in json format. The advantage is that you can fetch or send information from various sources over the net and locally while being widely supported many coding languages. You can do whatever you want as I just give my opinions. I've been coding for 35 years and using a web browser allowing people to access it over the net is a very bad idea.
  15. You can try to parse patterns in text areas for hyperlinks or youtube related links and if matches can transform to a link or an embed code. I've done what you were wondering for chat messages in the past. Usually something like bbcode is used to tag around it so is easier to detect. It's easier to use a WYSIWYG editor like ckeditor , tinymce which have an insert for hyperlink,image and video.
  16. In my opinion godaddy is good for registering domain names and not hosting. I also feel a dedicated or a very good vps is the only way to go, otherwise most likely have issues somewhere. Shop around for best hosting and try to find one in your budget, pay the little extra for your sanity. ovh.com is very reliable https://www.ovh.com/us/vps/vps-classic.xml
  17. The usual way would be to use an api if they have one available, otherwise connect to the website using file_get_contents or curl , parse the data you need, display it or save into your own database for display when needed. It's not always possible to iframe another site, some won't allow and get a white page or browser redirects, even jumping out of frame and leaving your site. I have another post explaining api's and ways to parse data http://forums.phpfreaks.com/topic/291985-how-to-make-useful-native-apps/?p=1494550 mediawiki is a wikipedia api There is also sites that have rdf data available, dbpedia would be one of them Learn about the semantic web There are a few sites that have complete rdf data sets available to download and can be used as local data. http://datahub.io/dataset http://www.w3.org/wiki/DataSetRDFDumps http://www.w3.org/wiki/TaskForces/CommunityProjects/LinkingOpenData/DataSets http://www.rdfhdt.org/datasets/ http://www.rdfdata.org/data.html
  18. Not sure what you have going on there, but you can modify the date using strtotime And sure, changing the timezone wouldn't help for the past inserted ones, only make more of a mess.
  19. Use percentages versus pixel sizes in the css. I'm pretty sure that pindol theme has a full width option.
  20. It looks like some expected file locations are wrong. Is guzzle installed properly?
  21. He showed it in the sample.php. Change the user credentials to your own. Change to whichever platform needed. $datos = array( "username" => "email@email.com", "password" => "password", "platform" => "xbox360", // xbox360, pc, ps3 "hash" => "md5hash", // answer in hash ); Yes there is a bunch of functions, all made so wouldn't need to learn. What all that does is log you in and emulate a browser and if you were a user logged in What you probably missed is that the person wrote that using guzzle framework Is not a complete autobuyer, it connects and returns json data. Would be up to you to create some sort of algorithm or buying/selling patterns using the data. Lets imagine we don't use the guzzle framework or even the curt2008 Fifa API. You would need to log into a site using your credentials. The expected way would be a person using a browser, instead we use a server and connect emulating a browser. curl would be my choice to connect and return data, there are also other methods that may be better depending the type of data or simplicity. You would visit each of your desired urls you plan to scrape/parse data from. You can use this data directly or create an api such as that person did, by making it all into an array and creating headers for the browser, show as json data. json_decode can be used to make the json data back into a normal array or directly access the objects. Here is another post I did explaining api's, methods to parse data and some useful information about them. http://forums.phpfreaks.com/topic/291985-how-to-make-useful-native-apps/?p=1494550
  22. Not recommending anything, if use a framework then use their login along with it, if want something custom go with your own. Sounds like are making own cms which wouldn't seem to be any bloat by using the framework. If you are going to be doing projects as a developer might as well learn laravel and have that in your arsenal. Kinda goes like this, keep learning frameworks or upgrade your own custom codes as needed. I'm not a person who relies on frameworks and do all my own, stopped freelancing years ago, but if I did I would make sure I knew the ins and outs the latest popular frameworks. Which is easier or better suited for your needs? Here is some cms made with laravel you can look over, see their code and such. http://maxoffsky.com/code-blog/list-cmss-built-laravel/ angularjs may be something of interest to you as well https://github.com/mrgamer/angular-login-example
  23. Laravel isn't a bad choice for you really. I use a combination of password_hash and sessions through a process script register and login forms everything passes through process.php which is a class process.php includes a sessions.php with various functions for determining admin, login, logout ,register, account editing actions, setting cookies and so on process script handles all header redirects, email validation, spam ip checks, forgot password, I'm sure can make a single script to do it all, is how I happened to make it. user log in levels 1-10 user names always lower cased and checked to ensure is just one session values retain the users name and level incorporated user logged in tracking, last logged in times guest versus user tracking using ip, useful for visitors, email registration confirmations ,ddos or mass registration attempts and so on profile page is simple enough by making a profile.php script using their name for the variable, or id if that suits your needs better...or both /profile.php?user=bobby /profile.php?id=234 I stick to using their username for everything since I have them stored in session as that, so is simple to incorporate a "my page" using their logged in session name or for whatever other action need to do for that user user edit script would be included and work just for that user...again checking against logged in session for any actions could even do on the fly wildcard subdomains, parse the domain and use the users name from it to collect their data from mysql once you have a working login system can get as advanced as want with it I like sqlite, but I would probably only use it for a per user data like preferences or something, the file locking isn't that elegant across a large site.
  24. Try following this tutorial for lamp install, should work for you. https://en.opensuse.org/SDB:LAMP_setup
×
×
  • 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.