VSource Web Solutions About Us  |  News  |  Contact Info  |  Network  |  Policies  |  Login  |  Support  |  Forum  |  (866) 346-9327


Online Demo



   
 
Search Documentation Search Documentation
 
   

PHP Variables

   
 
Table Of Contents - Collapse

NEXT: VConsole Built In PHP Functions
 
   

Introduction To PHP Variables.
VConsole is famous for taking out all the work when it comes to designing web based software interfaces. This means that a lot of work is done before VConsole ever gets to your module files. Things like including function libraries, checking licensing, checking permissions, handling logins, building the graphical user interface (GUI), and more. Also, there are lots of variables that are set before your module files are even executed. The great thing about this is that you can use these variables in your own module and action files. Check out the list below.

PHP Global Variables.

  • $DBS['vconsole'] - String. The name of the main VConsole database.
     
  • $GLOB['encryption_key'] - String. This varies.
     
  • $GLOB['version'] - String. Set to the current VConsole version.
     
  • $GLOB['forcesecure'] - Bool. Set to true to force a secure connection or false to not force a secure connection.
     
  • $GLOB['dbhost'] - String. The MySQL database host.
     
  • $GLOB['dbuser'] - String. The MySQL database user name.
     
  • $GLOB['dbpass'] - String. The MySQL database password.
     
  • $GLOB['ftphost'] - String. The FTP hostname that should be used for updating the system.
     
  • $GLOB['ftpuser'] - String. The FTP username that should be used for updating the system.
     
  • $GLOB['ftppass'] - String. The FTP password that should be used for updating the system.
     
  • $GLOB['ftpdir'] - String. The FTP directory that should point to the vconsole directory when logged in using the FTP parameters. Used for updating the system.
     
  • $GLOB['ftpcgi'] - String. The FTP directory that should point to the cgi directory when logged in using the FTP parameters. Used for updating the system.
     
  • $GLOB['dbh'] - Object. The MySQL database handle used by the db_query() function.
     
  • $GLOB['STATECODES'] - Array. An associative array of all the state names as keys and 2 character state codes as values.
     
  • $GLOB['STATENAMES'] - Array. An associative array of all the 2 character state codes as keys and the state names as values.
     
  • $GLOB['DAYS'] - Array. An array of all the weekdays starting with Sunday.
     
  • $GLOB['MONTHS'] - Array. An array of all the months starting with January.
     
  • $GLOB['templates_dir'] - String. Set to skins/vsource/templates
     
  • $GLOB['main_template'] - String. Set to skins/vsource/templates/main.html
     
  • $GLOB['session'] - Array. An associative array of the currently logged in user's session entry in the vc_sessions table. Keys are MySQL field names and values are the values of those fields.
     
  • $GLOB['login'] - Array. An associative array of the currently logged in user from the vc_logins table. Keys are the MySQL field names and values are the values of those fields.
     
  • $GLOB['GROUPS'] - Array. An associative array of all the group ids (as defined in the vc_groups table) that the user belongs to. The keys are group ids and the values are 0 for regular group or 1 for supergroup.
     
  • $GLOB['superuser'] - Bool. Set to 1 if the user belongs to a supergroup or 0 if not.
     
  • $GLOB['account'] - Array. An associative array of the currently logged in users account record from the vc_accounts table. Keys are MySQL field names and values are the values of those fields.
     
  • $GLOB['cmodule'] - Array. An associative array of the current module record from the vc_modules table. Keys are MySQL field names and values are the values of those fields.
     
  • $OUT['PROTO'] - String. Either 'http' or 'https' depending on whether the user is currently accessing the interface via a secure connection or not.
     
  • $OUT['CWD'] - String. The current absolute http working directory (http, not file path) If the user is accessing the software via the url https://yourdomain.com/vconsole/index.php then this is set to /vconsole/
     
  • $OUT['BASEURL'] - String. The current base URL without the ending file name. Everything in the URL ending with the last forward slash. If the user is accessing the software via the url https://yourdomain.com/vconsole/index.php then this is set to https://yourdomain.com/vconsole/
     
  • $OUT['SELFURL'] - String. The full url that the user is accessing. If the user is accessing the software via the url https://yourdomain.com/vconsole/index.php then this is set to https://yourdomain.com/vconsole/index.php
     
  • $OUT['UID'] - String. Set to a different 32 character unique id on every access to the software.
     
  • $OUT['SKIN'] - String. Set to vsource
     
  • $OUT['timeout'] - Number. Set to the current interface timeout in seconds.
     
  • $OUT['NAME'] - String. Set to the full name of the currently logged in user.
     
  • $OUT['WELCOME'] - String. Set to a welcome message that greets the user.
     
  • $OUT['TOPMENU'] - String. Set to the HTML code used for the main top menu.
     
  • $OUT['MENUSYSTEM'] - String. Set to the HTML code that is used for the drop down menu system.
     
  • $OUT['SCREENTITLE'] - String. Set to the main title of the interface. (Not the page title, the header like text just below the top navigation bar.) When you go to a module, this is set to the name of the module.
     
  • $OUT['MODULES'] - String. Set to the HTML code that is used for the top navigation bar.
     
  • $PARAMS - Array. Set to an associative array that contains all the records in the vc_console-params table as well as all the records in the vc_logins-params table. The name fields are used as keys and the value fields are used as values. Entering a new record in the vc_console-params table will add a new element to this array. Also, records from the vc_logins-params table can be set different for each user. Only records from the vc_logins-params table that match the login id of the current user are found in this array. If a record in the vc_console-params and vc_logins-params table conflict, then the record from the vc_logins-params table will take priority.
     
  • $_SESSION['imgstring'] - String. Set to the 5 characters that the user has to enter when they login. This variable is scrambled on every access to the software.
     
  • $_SESSION['key'] - String. Set to the sessionid field from the user's session record in the vc_session table.
     
  • $_SESSION['sort'] - Number. The column id as set in the vc_data-views table for the column that is currently set as the sort field. Used only for datamanager modules.
     
  • $_SESSION['rev'] - Bool. If 1, then the sort is reversed, if 0 then the sort is not reversed. Used only for datamanager modules.
     
  • $_SESSION['page'] - Number. The current page number of records to show. Used only for datamanager modules. (Not used since V4.5-4)
     
  • $_SESSION['lines'] - Number. The current number of lines per page to show. Used only for datamanager modules.
     
  • $_SESSION['view'] - Number. The current view id as set in the vid field in the vc_data-views table for the current login / module. Used only for datamanager modules.
     
  • $_SESSION['display'] - Number. Set to the current display type.
    • 0 - List display
    • 1 - Icon display
    • 2 - Calendar display
    • 3 - Chart display
    • 4 - Map display
       
  • $_SESSION['calfield'] - String. The name of the current calendar field to show in the calendar display. Used only for datamanager modules.
     
  • $_SESSION['caldate'] - String. A MySQL formatted date to shown in the calendar. Used only for datamanager modules.
      
  • $_SESSION['module'] - String. Set to the name of the current module.

NEXT: VConsole Built In PHP Functions


COMMENTS
 

There are no comments at this time.

Post Your Comment
 
Your Name*
Your Email Address* (Not Shown)
Your Comment (HTML OK)*
Enter the characters that you see here
Get New Image
*required fields