Jump to content

DrDankWD

Members
  • Posts

    27
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

DrDankWD's Achievements

Member

Member (2/5)

0

Reputation

  1. Thanks everyone, I appreciate all the input. So it looks like there is no foolproof way to protect myself from one of my devs stealing this application if they so choose. If my only recourse after the fact would be sueing for copyright, it would make sense then to avoid letting any developer have access that is located in a country that doesn't adhere to copyright laws...
  2. Its not this developer in particular I am concerned about, but my intentions are to continue to add more developers to support this application as it continues to grow. It just seems like a smart idea to try to protect the application as best as possible.
  3. Thanks for the quick answer! The OS is linux with cpanel/whm. What exactly do you mean by locking the files? Would this be done using chmod or is there a better way. The issue with chmod that worries me is the developer could just upload a little script to chmod all the files back.
  4. I have a rather large application that has been developed over the past couple years using a single coder. I am looking to introduce another coder into the application to help with some new features, however I do now want to give the coder full access to the all the files of the application. I would like to be able to specify what files and folders a particular developer can manipulate. Anyone know of some options to accomplish this? Mods - Sorry if this is in the wrong forum, feel free to move if it is.
  5. Well I have narrowed it down to the server environment. Same code works fien on a cpanel/whm server. The box its currently on is a Plesk server that has been nothing but trouble.
  6. I am having some trouble with an ajax request using prototype.js. Basically I had a function that save some content to the database, the problem started when the amount of content was exceeding the character limit of GET. So i switched the 'method' to POST. But now I am getting a 406 Not Acceptable error when trying to make the request. Here is the ajax request: function saveEditPage(page_id) { var url = 'ajax/prTreeAjax.php?action=saveEditPage'; var pars = ''; pars += 'page_id=' + page_id; pars += '&title=' + escape(document.getElementById('edit_page_title').value); pars += '&description=' + escape(document.getElementById('edit_description').value); var myAjax = new Ajax.Request( url, { method: 'post', parameters: pars, onComplete: getMessageResponse }); function getMessageResponse(originalRequest) { showPage(page_id); } } Anyone have any ideas as to why I am getting the 406 error when using the POST method? When I use GET it works fine (other than not allow for the large amount of text to be sent). Thanks, DrDankWD
  7. I have a tree menu that is populated from a SQL database. When you select a tree item there is an option to add a sub page to the database. This all works fine, but I am tryign to use ajax to refresh the tree. What I have: JS Function function refreshPages(project_id) { var url = 'ajax/prTreeAjax.php'; var pars = 'action=refreshPages'; pars += '&pId=' + project_id; var myAjax = new Ajax.Updater( 'treeHolder', url, { method: 'get', parameters: pars, evalScripts: true }); } On the prTreeAjax.php page this is what is executed: <?php //get the tree items// include ('../includes/treeBuilder.php'); ?> <script language="JavaScript"> new tree (<?=$tree_items?>, tree_tpl); </script> The problem I am having is instead of just the div with the id "treeHolder" being refreshed with a new tree, the page goes blank and the new tree is the only thing displayed. I hope that makes sense. I am going crazy trying to figure this out Any help is much appreciated.
  8. Awesome I think that will work!! I didn't even think of joining the table with itself. Thanks for the quick reply!!
  9. I'm stumped, im hoping someone has an idea... I have a DB table: prSitemap_pages With the fields: id parent_id title project_id When a page has a parent_id of 0 it is a top level page, when a page has a parent_id of another pages id then it is a sub page. There can be an unlimited number of subpages for each parent and subpage (sub sub pages, and sub sub sub sub pages, etc.) When I am trying to create a display of all the pages and thier sub pages I am not sure how to go about nesting the loops. Basically what I have is: $project_id = $_GET['pId']; $get_parents = db_query("SELECT * FROM prSitemap_pages WHERE project_id = '$project_id' AND parent_id = '0'"); while ($parents = mysql_fetch_array($get_parents)){ //print parent echo $parents['title'].'<br />'; //get_children/// $get_children1 = db_query("SELECT * FROM prSitemap_pages WHERE project_id = '$project_id' AND parent_id = '".$parents['id']."'"); while ($children1 = mysql_fetch_array($get_children1)){ //print the child echo $children1['title'].'<br />'; } } The above method would work if I knew how many layers down the sub pages would go. I would just keep nesting another while statement into the previous until I had reached the fathest the sub pages could go. But the issue is that the amount of sub pages layers could go down is unlimited. I hope that makes sense, its been a long day
  10. Hello, I am trying to figure out something for a news module. I would like to display a random news article from the database, but I would like to limit it to the 5 most recent news posts. For instance: There are 25 dated articles in the database, Out of the 5 most recent I would like to pick one to display. I am not sure how to write this query, any help would be much appreciated. Thanks DrDankWD
  11. I didn't even think of AVG(), that should work nicely, I will post here if I have any more problems with this, otherwise will close the post. Thanks!! -DrDankWD
  12. Hello, I need a bit of help making an average from multiple ratings. There are two DB tables, one is "venues" the other is "ratings" the "venues_id" field in the "ratings" table matches up with the "venues_id" field in the "venues" table. The "ratings" table had three different values for different aspects of the rating: "food", "service", "ambience". Each one of the three rating parts is a number 1-5. What I need to do is get an average rating for each venue. If this doesn't make any sense please let me know, I will try harder to explain it. Thanks In Advance, DrDankWD
  13. Thanks to both of you! I have been playing around and leraning a bit more of XML. Once more quick question, how would I go about including a php file in am xml file. In php if i wanted to include a file I would just do a include('filename_goes.here'); but I am not sure how this is done in XML. Thanks again!
  14. I have pretty much no knowledge of XML, my php skills are sufficient, but nothing to brag about. I have a FLV player that runs a playlist from a XML file, I would like to make the XML be populated from a mysql database, but I am not sure how to go about doing this, I tried using php in xml file with no luck. Here is the code i used: <?php $host = "localhost"; $user = "icommerc"; $pass = "********"; $database = "media"; $linkID = mysql_connect($host, $user, $pass) or die("Could not connect to host."); mysql_select_db($database, $linkID) or die("Could not find database."); ?> <xml> <?php $media_query = ("SELECT * FROM media_files ORDER BY sort_order"); while ($media_results = mysql_fetch_array($media_query) { ?> <listitem name="<?php echo $media_results['name'];?>" url="streams" thumb="<?php echo $media_results['image'];?>"> <stream name="<?php echo $media_results['file'];?>" start="0" len="-1"/> </listitem> <?php } ?> <menu> <?php $menu_query = ("SELECT * FROM media_files ORDER BY sort_order"); while ($menu_results = mysql_fetch_array($menu_query) { ?> <listitem name="<?php echo $menu_results['name'];?>"/> <?php } ?> </menu> </xml> Is it possible to use XML and PHP in the same file like I have above? Please don't throw rocks at me for being so stupid!
×
×
  • 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.