if ($_SERVER['REQUEST_METHOD'] === 'POST') { $langid = $_POST["langid"]; $package = $_POST["pkg"]; $class = $_POST["class"]; $version = $_POST["ver"]; $method = $_POST["method"]; } else { $langid = $_GET["langid"]; $package = $_GET["pkg"]; $class = $_GET["class"]; $version = $_GET["ver"]; $method = $_GET["method"]; } $ds = cc_frm_openDataSource(); /* ------------------------------------------------------------------------------ * Get all menu captions and urls * --------------------------------------------------------------------------- */ $query = "SELECT menuid, caption, link FROM menu_captions WHERE menuid = 'main_home' AND langid = '".$langid."'"; //printf("%s", $query); $Result = mysql_query($query) or die("Clara-Doc - menu_captions".mysql_error()); $menu_captions = array(); while ($record = mysql_fetch_array($Result)) { $menu_captions[$record[0]][0] = $record[1]; $menu_captions[$record[0]][1] = $record[2]; } /* ------------------------------------------------------------------------------ * Get all page captions * --------------------------------------------------------------------------- */ $query = "SELECT captionid, caption FROM page_captions WHERE pagename = 'method_ref' AND langid = '".$langid."'"; //printf("%s", $query); $Result = mysql_query($query) or die("Clara-Doc - Packages".mysql_error()); $captions = array(); while ($record = mysql_fetch_array($Result)) { $captions[$record[0]] = $record[1]; } $query = "SELECT release_date FROM versions WHERE pkgname = '".$package."' AND version ='".$version."'"; //printf("%s", $query); $Result = mysql_query($query) or die("Method Reference - ".mysql_error()); $record = mysql_fetch_array($Result); $date = $record[0]; $query = "SELECT description FROM class_descriptions WHERE pkgname = '".$package."' AND classname ='".$class."' AND langid = '".$langid."'"; //printf("%s", $query); $Result = mysql_query($query) or die("Method Reference - ".mysql_error()); $record = mysql_fetch_array($Result); $class_desc = $record[0]; function cc_frm_openDataSource() { //$ds = mysql_connect("localhost", "frederic", "mandrake@123"); $ds = mysql_connect("ilove400com.netfirmsmysql.com", "clara", "prettybirdy@123"); if (!$ds) { die("cc_OpenDataSource - ".mysql_error()); } mysql_select_db("clarasoft") or die("cc_OpenDataSource - DS connect error"); mysql_query("SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'", $ds); header('Content-Type: text/html; charset=utf-8'); return $ds; } ?>