Location: PHPKode > projects > Warp.cms - php/mysql content management > warp_121/ax_help.php
<?php

// [warp administration module - documentation app v.1.2.1]
// xantis.warp.cms - version 1.2
// (c) 2002 xantis - all rights reserved
// this code is registered and protected by international copyrights laws


//####### Register Globals !

extract($HTTP_ENV_VARS);
extract($HTTP_GET_VARS);
extract($HTTP_POST_VARS);
extract($HTTP_COOKIE_VARS);
extract($HTTP_SERVER_VARS);

//#########################

$xnt_control_var = 'xnt2002warp.cms';

require("lib_adv.php");


if (empty($doc_op)) {
	$doc_op = 'intro';
} //end if

//################################################# HELP


function xshow_the_help () {


//-----------------globals general
global	$arr_var_result, $arr_var_fields, $var_result_size, $xmy_wr_ok_msg, $xmy_wr_aff_msg, $warp_numform_decimal_sep, $warp_numform_thousand_sep ;

//-----------------ax lib globals
global	$ax_website_addr, $ax_picts_dir, $ax_txt_lnk_color, $ax_bg_color, $ax_th_color, $ax_td_color, $ax_td_color_alt, $ax_tx_color,
$ax_tx_color_err, $ax_tx_color_sp, $ax_tx_color_qe ;

//---------------- internal
global	$doc_op, $xnam, $xid, $offset, $qval;

//---------------- auth
global	$PHP_AUTH_USER, $PHP_AUTH_PW ;


	echo ('<br>');
	xcenter_start ();
	xtable_start_brd('750');

	//----------------------------------

		xtable_row_start ();
			xtable_column_start_vcenter ('1', '', "$ax_tx_color");

				xtable_start ('100%');
					xtable_row_start ();
						xtable_column_start_vcenter ('1', '40', "$ax_tx_color");
							xpict ("$ax_website_addr"."$ax_picts_dir".'/'.'help.gif', '30', '30');
						xtable_column_end ();

						xtable_column_start_vcenter ('1', '', "$ax_tx_color");
								xtext_title_admin ('&nbsp;Warp Documentation&nbsp;');
						xtable_column_end ();

						xtable_column_start_vcenter ('1', '', "$ax_tx_color");
							xcenter_right_start();
							if ($doc_op == 'intro') {
								xtext_admin ('<b>Main Index</b>');
							} //end if
							else {
								xtext_link_admin ('Return To Main Index', "$ax_website_addr"."ax_help.php", '_self');
							} //end else
							echo('&nbsp;');
							xcenter_end();
						xtable_column_end ();
					xtable_row_end ();
				xtable_end();

			xtable_column_end ();
		xtable_row_end ();


	switch ($doc_op) {
		case 'intro':
			xtable_row_start ();
				xtable_column_start_vcenter ('1', '', "$ax_tx_color");

					xnewline();
					xcenter_start();
					xtable_start ('75%');

					xmysql_read_data_ax (" SELECT id, title FROM warp_documentation ORDER BY title ASC ");
					//$arr_var_result
					xtable_row_start ();
						xtable_column_start_vcenter ('2', '', "$ax_tx_color");
							xtext_admin ('<b>General Documentations :</b>');
						xtable_column_end ();
					xtable_row_end ();
					for ($dfy_i=0; $dfy_i<count($arr_var_result); $dfy_i++) {
						$dfy_i_id = $dfy_i;
						$dfy_i_title = $dfy_i + 1;
						$dfy_i = $dfy_i + 1;

						xtable_row_start ();
							xtable_column_start_vcenter ('1', '20', "$ax_tx_color");
								xpict ("$ax_website_addr"."$ax_picts_dir".'/help_mark.gif', '11', '11');
							xtable_column_end ();

							xtable_column_start_vcenter ('1', '', "$ax_tx_color");
								xtext_link_admin ($arr_var_result[$dfy_i_title], "$ax_website_addr"."ax_help.php?doc_op=hlpx&xid=$arr_var_result[$dfy_i_id]", '_self');
							xtable_column_end ();
						xtable_row_end ();
					} //end for


					xmysql_read_data_ax (" SELECT tbl_name FROM warp_tables_defs ORDER BY tbl_name ASC ");
					//$arr_var_result
					xtable_row_start ();
						xtable_column_start_vcenter ('2', '', "$ax_tx_color");
							xnewline();
							xnewline();
							xtext_admin ('<b>Table Specific Documentations :</b>');
						xtable_column_end ();
					xtable_row_end ();
					for ($dfy_i=0; $dfy_i<count($arr_var_result); $dfy_i++) {
						xtable_row_start ();
							xtable_column_start_vcenter ('1', '20', "$ax_tx_color");
								xpict ("$ax_website_addr"."$ax_picts_dir".'/help_mark.gif', '11', '11');
							xtable_column_end ();

							xtable_column_start_vcenter ('1', '', "$ax_tx_color");
								xtext_link_admin ('Table&nbsp;:&nbsp;`'.$arr_var_result[$dfy_i].'`', "$ax_website_addr"."ax_help.php?doc_op=hlptbl&xnam=$arr_var_result[$dfy_i]", '_self');
							xtable_column_end ();
						xtable_row_end ();
					} //end for

					xtable_end();
					xcenter_end();
					xnewline();
				xtable_column_end ();
			xtable_row_end ();
			break;
		case 'hlpx':
			xtable_row_start ();
				xtable_column_start_vcenter ('1', '', "$ax_tx_color");

					xmysql_read_data_ax (" SELECT title, docs FROM warp_documentation WHERE (id='$xid') ");
					//$arr_var_result

					xnewline();
					xtable_start('100%');
						xtable_row_start ();
							xtable_column_start_vcenter ('1', '', "$ax_tx_color");
								xtext_admin ('<b>Documentation : `'.$arr_var_result[0].'`</b>');
								xnewline();
								xnewline();
								xtext_admin ($arr_var_result[1]);
							xtable_column_end ();
						xtable_row_end ();
					xtable_end();
					xnewline();

				xtable_column_end ();
			xtable_row_end ();

			break;
		case 'hlptbl':
			xtable_row_start ();
				xtable_column_start_vcenter ('1', '', "$ax_tx_color");

					xmysql_read_data_ax (" SELECT tbl_descr, tbl_hint, note_insert, note_edit, note_delete, docs FROM warp_tables_defs WHERE (tbl_name='$xnam') ");
					//$arr_var_result

					$arr_vx_res_tbl = array();
					$arr_vx_res_tbl = $arr_var_result;
					$arr_var_result = array();

					xmysql_read_data_ax (" SELECT field_name, field_descr, field_hint FROM warp_tables_fields WHERE (table_own='$xnam') ORDER BY field_id ASC ");
					//$arr_var_result

					xnewline();
					xtable_start_brd('100%');
						xtable_row_start ();
							xtable_column_start_vcenter ('2', '', "$ax_tx_color");
								xtext_admin ('<b>Table : `'.$xnam.'` - ['.$arr_vx_res_tbl[0].']</b>');
								xnewline();
								xtext_admin ('<font color="'.$ax_tx_color_qe.'"><i>'.$arr_vx_res_tbl[1].'</i></font>');
								xnewline();
								xnewline();
								xtext_admin ('<font color="'.$ax_tx_color_sp.'"><i>'.'INSERTING NEW RECORDS - '.$arr_vx_res_tbl[2].'</i></font>');
								xnewline();
								xnewline();
								xtext_admin ('<font color="'.$ax_tx_color_sp.'"><i>'.'EDITING RECORDS - '.$arr_vx_res_tbl[3].'</i></font>');
								xnewline();
								xnewline();
								xtext_admin ('<font color="'.$ax_tx_color_sp.'"><i>'.'DELETING RECORDS - '.$arr_vx_res_tbl[4].'</i></font>');
								xnewline();
								xnewline();
							xtable_column_end ();
						xtable_row_end ();

						xtable_row_start ();
							xtable_column_start_vcenter ('2', '', "$ax_tx_color");
								xtext_admin ('<b>Table Field Description :</b><br>');
							xtable_column_end ();
						xtable_row_end ();

						for ($dfy_i=0; $dfy_i<count($arr_var_result); $dfy_i++) {
							$dfy_i_name = $dfy_i;
							$dfy_i_descr = $dfy_i + 1;
							$dfy_i_hint = $dfy_i + 2;
							$dfy_i = $dfy_i + 2;

							xtable_row_start ();
								xtable_column_start_vcenter ('1', '', "$ax_tx_color");
									xtext_admin ('<font color="'.$ax_tx_color_sp.'">'.'<b>'.xhtml_text ($arr_var_result[$dfy_i_name], 'n', '').'</b>'.'</font>');
									xnewline();
									xtext_admin ('<b>'.xhtml_text ($arr_var_result[$dfy_i_descr].' : ', 'n', '').'</b>');
								xtable_column_end ();

								xtable_column_start_vcenter ('1', '', "$ax_tx_color");
									xtext_admin ('<font color="'.$ax_tx_color_qe.'">'.xhtml_text ($arr_var_result[$dfy_i_hint], 'n', '').'</font>');
								xtable_column_end ();
							xtable_row_end ();
						} //end for

						xtable_row_start ();
							xtable_column_start_vcenter ('2', '', "$ax_tx_color");
								xtext_admin ('<b>Extra Table Documentation :</b><br>'.$arr_vx_res_tbl[5]);
							xtable_column_end ();
						xtable_row_end ();

					xtable_end();
					xnewline();

				xtable_column_end ();
			xtable_row_end ();
			break;
		default:
			xtable_row_start ();
				xtable_column_start_vcenter ('1', '', "$ax_tx_color");
					xtext_admin_error ('ERROR : Invalid operation !');
				xtable_column_end ();
			xtable_row_end ();
			die('');
	} //end switch


	//----------------------------------

	xtable_end();
	xcenter_end ();
	xnewline ();



} //END FUNCTION



//#########################################################################################


//---------------------------------------------------------page header
xheader (':: warp.cms.admin .:. Warp Documentation ::', 'admin');
//---------------------------------------------------------


xshow_the_help ();


//---------------------------------------------------------page footer
xfooter ();
//---------------------------------------------------------


//end of php code
?>
Return current item: Warp.cms - php/mysql content management