Jump to content

RecoilUK

Members
  • Posts

    29
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

RecoilUK's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi This has gotta be a joke right? Let me get this right, you are going to allow people to post pictures of other people including personal details without that persons consent and then allow people to comment on that person? I just hope you have very deep pockets. L8rs
  2. Hi NuSphere also have a product, basically it converts your scripts into compiled PHP bytecodes which increases security and provides a performance boost, as the PHP engine has to do this anyway. Its called NuCoder and comes with a license manager, so could be just what your looking for. This should stop all but the most knowledgable and persitent of hackers getting hold of the original code and prevent illegal distribution. Not knowing anything about the app you have designed, its hard to recommend a strategy, but if possible, encode the scripts as stated, and also provide hosting for it, then you control access to it, you could have a set of public scripts and keep the good stuff on a seperate server behind a firewall. Hope it helps. L8rs
  3. Hi guys Just thought I would ask a question regarding modular design in PHP, as i,m having a bit of a hard time trying to get my head around it. Ok, so I want to design a CMS with a modular approach with everything to run off of the index.php page, as its easier to implement SEF URL,s, for instance, say I want a news section, then I create a news module etc, etc. What I also want to do, is dynamically build a site navigation menu, based on the modules installed, and this is what i,m not sure about, obviously, some modules I dont want to display in the menu for everyone, as I,m not going to want everyone to have an admin link for obvious reasons, now if it wasnt for this access restriction I could simply list use scandir() to see what modules were in the folder, but now I have to put this in a database. Hopefully, extra modules are going to be installed through a CMS interface and file transfer system, so I want the module to install from a script included in the files that are uploaded. I,m just at the initial roughing out of ideas stage for this project, and would be interested in your opinions and suggestions. Thanks guys.
  4. Hi I,ll try to explain ... Admin is a module, its also a parent of Users. Users is a sub module of Admin, so its a child. Parent = Module Child = Sub Module Should have just called them Module and Sub Module in the first place. Admin is not a child of anything. Its for a User Permission system as detailed in this thread http://www.phpfreaks.com/forums/index.php/topic,206313.0.html in which I asked for advice, and decided to give it try and see what happens. Modules are different areas of a website, with a group of permissions associated with them. I just want to get a complete list of Modules and any sub modules if they exist. So the admin in child from the result set, shouldnt be there, it should be in parent. Thanks
  5. Hi Maybe its called my.ini Anyway, the WAMP support forum may be able to help. http://www.wampserver.com/phorum/list.php?2 Hope that helps.
  6. Hi guys I have the following tables for a project i,m working on but for now i,m just interested in the modules table and the self referencing relationship. So far I have managed to build this query ... SELECT parent.module_name AS Parent, child.module_name AS Child FROM modules AS child LEFT JOIN modules AS parent ON child.has_parent = parent.module_id; Which at the moment gives me the following result set +--------+--------+ | Parent | Child | +--------+--------+ | NULL | admin | | admin | users | | admin | modules | +--------+--------+ Now, the problem is, if a child has a null parent, it should be a parent, ready for a child, and having limited experience with MySQL and SQL in general, i,m not even sure if this is possible to do, which is where I could do with a bit of help. Thanks guys [attachment deleted by admin]
  7. Hi Here is version number 2. Now i,m not sure how workable this is, as my queries up until now, whilst I have been learning php, have been limited to single tables, no experience of writing join queries at all. Hence the reason I would like someone with some experience to comment. Thanks [attachment deleted by admin]
  8. Hi Its MySQL Workbench. http://www.mysql.com/products/workbench/. Click on LEARN MORE at the bottom of the page for download and version info. L8rs
  9. Hi Again This is what I have come up with so far. I think its going to need a group table also, because the roles are quickly going to become to numerous to manage even on a basic site, so I am going to need a way of grouping roles for easy maintenance. Suggestions always welcome. Thanks [attachment deleted by admin]
  10. Hi guys I,m trying to design a user management database schema but it really has gotta be one of the hardest subjects to get your head around, or atleast I find that. I,m looking for anything at all, that you think could help, this is subject that I keep coming back to because I just cant decide on whats best, what will work, what wont, so I keep falling at the first hurdle as it were. Any help you can give would be appreciated. Thanks
  11. Hi And guess what, I do believe your correct. Method deleted. Thanks for that. Anyone else got any opinions? L8rs
  12. Hi Ok here,s the update ... public function ParseArray($box, $file, $array) { if (is_array($array)) { $html = $this->GetTemplate($file); foreach ($array as $key => $value) { $datakey[$key] = "<DATA:$key />"; $datavalue[$key] = $value; } $this->SetBox($box, str_replace($datakey, $datavalue, $html)); unset ($datakey, $datavalue); } else { throw new Exception("Fatal Exception : ParseArray() requires 3rd Argument to be an array"); } unset ($box, $html, $file, $row, $array); } public function ParseResult($box, $file) { $html = $this->GetTemplate($file); while ($row = $this->db->fetch_assoc()) { foreach ($row as $key => $value) { $datakey[$key] = "<DATA:$key />"; $datavalue[$key] = $value; } $this->SetBox($box, str_replace($datakey, $datavalue, $html)); unset ($datakey, $datavalue); } unset ($box, $html, $file, $row); } Now, the question is, do I keep both functions or just the array function, as both these accomplish the same result... while ($array = $db->result->fetch_assoc()) { $template->ParseArray('content','test.html', $array); } $array = array('User' => 'RecoilUK', 'Password' => 'inyourdreams'); $template->ParseArray('content','test.html', $array); What do you think? actually, I guess I already know your answer. Thanks
  13. Hi Thinking about it, I could also add a ParseArray() method, which would work exactly like ParseResult(), with an extra an array argument and working on that instead of the assoc array from the database class. Thanks
  14. Hi Originally, I just had the setbox and setflag methods, and these could still be used it you wanted to manipulate query data, for instance .. Some method gets query results from database. Manipulates data. Then directly puts data into box with a combination of GetTemplate(); Parse Template internally(Could need another template method for this) and SetBox();. But then I thought, it would be good to have a method acting directly on a result set for when the need arises. L8rs
  15. Hi Thanks for the response. I,ll answer question 4 first. Its accessing the database object directly because of the way the database object works, its also a singleton and the query, instead of the usual method of spitting out the result to whatever method or function called the query, it assigns the result to $this->result, so it never leaves the database object, to get access to the data you have to use additional methods such as $db->result->fetch_assoc();. So in efect, it doesnt actually control the query, it just has access to the query data when another part of the control process decides to give it, turns the data into something suitable for parsing and uses it. I thought it may limit the amount of querys between different scripts that are working on the same data. Question 1 and 3 as they are related. Its a sinlgeton because I cant see it working any other way, there is no point having losts of different template objects as the template class isnt aware that they exist. If you want to have one template inside another then say the first 'layout.html' as ,<BOX:header />, <BOX:footer /> for example, and it needed a space to load a second template, then you could call this 'template2' just for example and create a seperate box for it <BOX:template2 />, do whatever you needed and load data into that box. Its an accumulative template engine, it never overwrites any data, just adds data to previously entered data. Question 2. The ParseResult method is designed for dynamic data, first it gets the template file, which will contain the placeholders for the dynamic data you wish to display, say <DATA:username /> <DATA:age /> etc, with maybe some html table tags, and instead of you having to enter hundreds of these tags, it will loop over the result given to it one row at a time, alter the data for display and parse the template, loading the data into whatever box you told it to. And it already has 3 data setters, SetFlag(), SetBox(), and ParseResult() you can use whatever one is most suitable. Hope that answers your questions. What i,m really interested in though, is what, if any, could be problems in the future as the application grows. Thanks again.
×
×
  • 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.