phpSite

Primary site now at http://phpsite.sf.net.
phpSite provides a framework for real webmasters to seriously create/edit/manage powerful, flexiable and modulated web sites extremely easy using their preferred text/html editor (or a browser soon, like a wiki). Webmasters generate web pages content using HTML/CSS and define page layouts via writting a web page avatar and skin using HTML/CSS, and can create/update backbone php modules with ease. phpSite can support any databases that php supports, such as PostgreSQL, however currently only a MySQL interface is implemented. phpSite can support any coding language within HTML, such as C/C++, however currently only supports php and python. phpSite has many modules already included in the package, such as: authorisation, file management and shop tools.

Why use phpSite?

  • Installed/Updated via a Makefile.
  • All page content is defined by a tree structure, using one, or multiple XML/HTML/CSS files.
  • Web page style and layout (i.e. skins, avatars) can be designed (HTML/CSS) for particular or many pages.
  • Code (e.g. php, python) is supported in imported HTML pages. The code output is displayed wherever the the code is written in the HTML pages.
  • phpSite variables can be used within the HTML pages and any code that resides within those HTML pages.
  • There are many modules (see below) available to create authentication systems, file managers, shops, etc
  • All page files are a copy of a skeleton index file and is created when you first visit your home page.
  • Command line scripts to update site html or database. Great for scheduling regular site updates via, for example, crontab.
  • geoip, ip2location supported.
  • XE.com exchange rate facilities.
  • reCAPTCHA.net supported.
  • Hits, sessions, IP and user tracking facilities.
  • Web site statistics interpreting facilities.
  • Shopping cart and ordering facilities.
  • Shop products star ratings.
  • A shop home page can be determined via calculating the most viewed products and what are new products.
  • Apache .htpasswd supported and integrated within user module
  • High Security:
    1. Auth module uses MD5 encryption for user passwords.
    2. Protection against web bots using CAPTCHA's in forms, and soon a better system.
    3. UNIX style read/write file access for the Filesystem module.
    4. Tested against website exploits such as Remote File Inclusion (RFI), Local File Inclusion (LFI) and SQL Injection.
Some Web Sites Using phpSite

Current Release (Free Software, Open Source)

Dependencies: make, rsync, [mysql-server], php5, php5-mysql, php5-cli, [python]
Filesystem Module Dependencies: convert (i.e. ImageMagick), ffmpeg

Linux: phpSite-1.10.tgz
Windows: Coming Soon

Supported Databases: mysql
Supported Lanagauage within included HTML files (steming from phpSite/site/data.xml): php, python
Modules Included: Mail Module, DB Module, Stats Module, Filesystem Module, Authentication Module, Shop Module (incomplete)

Lines Of Code (LOC)

True Code

Please note sloccount does not include white space.

localhost:~>sloccount phpSite/*

SLOC    Directory       SLOC-by-Language (Sorted)
12842   src             php=12798,ansic=44
2159    scripts         php=2152,sh=7
156     contrib         php=156
0       CVS             (none)
0       avatars         (none)
0       conf            (none)
0       images          (none)
0       site            (none)
0       skins           (none)
0       top_dir         (none)


Totals grouped by language (dominant language first):
php:          15106 (99.66%)
ansic:           44 (0.29%)
sh:               7 (0.05%)




Total Physical Source Lines of Code (SLOC)                = 15,157
Development Effort Estimate, Person-Years (Person-Months) = 3.47
(41.67)
 (Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05))
Schedule Estimate, Years (Months)                         = 0.86
(10.32)
 (Basic COCOMO model, Months = 2.5 * (person-months**0.38))
Estimated Average Number of Developers (Effort/Schedule)  = 4.04
Total Estimated Cost to Develop                           = $ 469,122
 (average salary = $56,286/year, overhead = 2.40).
SLOCCount, Copyright (C) 2001-2004 David A. Wheeler
SLOCCount is Open Source Software/Free Software, licensed under the
GNU GPL.
SLOCCount comes with ABSOLUTELY NO WARRANTY, and you are welcome to
redistribute it under certain conditions as specified by the GNU GPL
license;
see the documentation for details.
Please credit this data as "generated using David A. Wheeler's 'SLOCCount'."
XML/HTML Code

Please note wc -l counts the white space.

localhost:~>wc -l phpSite/site/*
    275 data.xml
    763 data.xml.auth.body.html
     88 data.xml.auth.menu_right.html
    144 data.xml.db.body.html
     31 data.xml.db.menu_right.html
     75 data.xml.default.avatar.html
     59 data.xml.default.footer.html
      1 data.xml.default.header.html
    109 data.xml.default.menu_left.html
      0 data.xml.default.menu_right.html
      0 data.xml.default.skin.html
    323 data.xml.fs.body.html
     71 data.xml.fs.menu_right.html
     15 data.xml.index.body.html
    351 data.xml.mail.body.html
     47 data.xml.mail.menu_right.html
   3492 data.xml.shop.body.html
    163 data.xml.shop.menu_right.html
    110 data.xml.stats.body.html
     75 data.xml.stats.menu_right.html
      6 mail-body-confirm_new_email.txt
      6 mail-body-confirm_registration.txt
      6 mail-body-new_products.txt
      9 mail-body-order_status.txt
     21 mail-body-supplier_order.txt
      2 robots.txt
   6242 total
SQL Code

Please note wc -l counts the white space.

localhost:~>wc -l phpSite/scripts/db/*.sql phpSite/scripts/stats/*.sql \
 phpSite/scripts/auth/*.sql phpSite/scripts/shop/*.sql
   19 db/create_tables.sql
   14 db/drop_tables.sql
   62 stats/create_tables.sql
   17 stats/drop_tables.sql
   18 stats/export_table_data.sql
   18 stats/import_table_data.sql
  197 auth/create_tables.sql
   22 auth/drop_tables.sql
   23 auth/export_table_data.sql
   24 auth/import_table_data.sql
  312 shop/create_tables.sql
   33 shop/drop_tables.sql
   38 shop/export_table_data.sql
   32 shop/import_table_data.sql
  829 total