A quick look at the first file (admin.php) show me that :
- You're
using global, which is usually not a good idea.
- You're calling the echo
function many times, why not closing the barket and writing strait html
instead ?
- You're embedding things likeand in the code, which is bad for
maintainability, and also are deprecated and should be managed by a CSS or
template file instead.
- Please comment your code ! How can we help if we
don't know what the program is supposed to do ? Global is fine as the
core of the CMS turns off registering globals as that is a huge security
whole and the only items globalized are config information, a link to the
database, and a link to the users class. Again, my CMS was written with
security first, functionality second. So far it has proven more secure than
any other CMS I've tested. But, the version in current use has outgrown
it's usefulness as a more advanced system. Hence a complete rewrite. Again
focused on security first. The new rewrite will effectively remove
globalized variables, only 3 of which exist anyways. I do call echo a lot
and using straight HTML can make things simpler. I think it's more a
programmers choice. I've seen it all from programs that just appended to a
variable that is then finally output to the browser to straight HTML that
then has PHP plugged into it. I think all ways are viable and accomplish
the same task. Really up to the programmer(s) in my opinion. True, CSS
should maintain these items, which it does, only very very limited items
are used in the code to setup basic HTML elements that can be modified
within the CSS. What you see is the initial rough draft that was not ment
to be shown to the public. Hence no comments. I assure you my code is
commented heavily. I'm open to ideas on the output method to use when
dumping PHP. Personally, I don't like to output straight HTML with PHP code
plugged in. It prevents me from being able to make massive changes as my
system only uses the most basic HTML elements to show some of the data.
There are other modules with virtually no HTML code. Over my 6 years of PHP
I've found that echoing straight out when needed is efficient enough. I
have tried straight HTML with PHP plugged in, so I'm not just stating from
no knowledge. I've also tried dumping output to a global variable that is
then output by the final processor command. It can be useful to do it that
way, but I've found it harder to debug sometimes.
_______________________________________________
ArchServer Project General Mail List
Post messages to: [email protected]
Administer your subscription: http://lists.archserver.org/listinfo/general