// File: std.php // Desc: standard default includes for site // Global Error Reporting Level error_reporting (E_ERROR | E_WARNING | E_PARSE); //error_reporting (E_ALL); // Global Variables define("PATH_ROOT","/var/www/vhosts/sarcomaalliance.org/"); define("HTTP_ROOT","http://bb.sarcomaalliance.com/"); define("SQL_HOST","localhost"); define("SQL_DB","sarcoma"); define("SQL_USER","sarcoma"); define("SQL_PASS","sunflower"); session_start(); // Global Functions function load($Library) { require_once(PATH_ROOT."include/".$Library.".php"); } function NoCache() { header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header("Last-Modified: " . gmdate("D, d M Y H:i:s")-3600 . " GMT"); header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Pragma: no-cache"); // HTTP/1.0 } function FatalError($Msg) { printf("%s\n",$Msg); die; } function DebugInfo() { printf("P: %s",var_dump($_POST)); printf("G: %s",var_dump($_GET)); printf("S: %s",var_dump($_SESSION)); } function HasPermission($Char) { return(ereg("$Char",$_SESSION["permissions"])); } function TextFormat($Text) { //$Text=preg_replace("/\b((http(s?):\/\/)|(www\.))([\S\.]+)([\/\w+\.]+)\b/i", "$2$4$5$6",trim($Text)); // $Text=preg_replace("/((http(s?):\/\/)|(www\.))([\S\.]+)\b/i","$2$4$5", $Text); $Text=preg_replace("/\b((http(s?):\/\/)|(www\.))([\S\.]+)([\/\w+\.]+)\b/S", "$2$4$5$6",trim($Text)); $AllowableTags=",,,,,,,,,,,,,,,,,"; $Text=StripSlashes(trim($Text)); $Text=strip_tags($Text,$AllowableTags); $Text=str_replace("\r","",$Text); $Text=str_replace("\n","",$Text); $Text=str_replace("\t"," ",$Text); return($Text); } function NextPageString($Query, $Limit, $Offset,$Url,$Args) { $ResultCount=SQLFetchCount($Query); // make sure Query is selecting count(ct) $y=1; $Line=sprintf("(%d matches found)Results Page - [",$ResultCount); for($x=0; $x<$ResultCount; $x=$x+$Limit) { if($Offset==$x) $Line.=sprintf(" %d ",$y); else $Line.=sprintf(" %d ",$Url,$x,$Args,$y); $y++; } // end for x $Line.="]"; if($ResultCount<1) $Line="No matches found or too many results to display. Please try again and be more specific."; elseif($ResultCount<=$Limit) $Line=sprintf("(%d matches found)",$ResultCount); return($Line); } // NextPageString // Pulls a sentence from a paragraph/article function GetSentenceFromString($String, $MaxWidth) { $String=trim($String); $StringLength=strlen($String); // first, lets see if it's less than maxwidth, if yes, then just return it if($StringLength<=$MaxWidth) return($String); // Now lets see if we can get a complete sentence that's near MaxWidth $FirstPeriod=strpos($String,"."); if( ($FirstPeriod>($MaxWidth-50)) && ($FirstPeriod<($MaxWidth+20)) ) return(substr($String,0,$FirstPeriod+1)); // Last, lets just break it up on the first space after MaxWidth return(substr($String,0,strpos($String," ",$MaxWidth))." ... "); } // getsentencefromstring // Main load("sql"); load("user"); load("form"); load("category"); load("article"); load("links"); // db handler SQLConnect(SQL_HOST,SQL_DB,SQL_USER,SQL_PASS,SQL_PERSISTENT_CONN); // No caching! header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header("Last-Modified: " . gmdate("D, d M Y H:i:s")-3600 . " GMT"); header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Pragma: no-cache"); // HTTP/1.0 // default time for current page define("CURRENT_TIME",time()); $UserData=unserialize(stripslashes($_COOKIE['sarcoma_data'])); $UserPerms=$_COOKIE['sarcoma_perm']; $UserSid=$_COOKIE['sarcoma_sid']; ?> Sarcoma Alliance Peer-to-Peer Network - Application for Participation Section 1: Background All fields preceded by (*) must be filled in. (*) First Name : (*) Last Name : Date of Birth: MM: DD: YYYY: Sex : M F (*) Street Address: (*) City: (*) State (US): -- AK AL AR AZ CA CO CT DE FL GA HI IA ID IL IN KS KY LA MA MD ME MI MN MO MS MT NC ND NE NH NJ NM NV NY OH OK OR PA RI SC SD TN TX UT VA VT WA WI WV WY State (Non-US): (*) Country: United States Afghanistan Albania Algeria American Samoa Andorra Angola Anguilla Antigua Argentina Armenia Aruba Australia Austria Azerbaijan Bahamas Bahrain Bangladesh Barbados Barbuda Belarus Belgium Belize Benin Bermuda Bhutan Bolivia Bonaire Bosnia-Herzegovina Botswana Brazil Brunei Bulgaria Burkina Faso Burundi Cambodia Cameroon Canada Canary Islands Cape Verde Islands Caroline Islands Cayman Islands Central African Republic Chad Chile China Colombia Comoros Congo Cook Islands Costa Rica Cote d'Ivoire Croatia Cuba Curacao Cyprus Czech Republic Denmark Djibouti Dominica Dominican Republic Ecuador Egypt El Salvador Equatorial Guinea Eritrea Estonia Ethiopia Falkland Islands Faroe Islands Fiji Finland France French Guiana French Polynesia Gabon Gambia Georgia Germany Ghana Gibraltar Greece Greenland Grenada Guadeloupe Guam Guatemala Guinea Guinea-Bissau Guyana Haiti Honduras Hong Kong Hungary Iceland India Indonesia Iran Iraq Ireland Israel Italy Jamaica Japan Jordan Kazakhstan Kenya Kirgizstan Kiribati Korea (North) Korea (South) Kuwait Laos Latvia Lebanon Lesotho Liberia Libya Liechtenstein Lithuania Luxembourg Macau Macedonia Madagascar Malawi Malaysia Maldives Mali Malta Marshall Islands Martinique Mauritania Mauritius Mayotte Mexico Micronesia Moldova Monaco Mongolia Montserrat Morocco Mozambique Myanmar Namibia Nauru Nepal Netherlands Nevis New Caledonia New Zealand Nicaragua Niger Nigeria Norway Oman Pakistan Panama Papua New Guinea Paraguay Peru Philippines Pitcairn Island Poland Portugal Puerto Rico Qatar Reunion Romania Russia Rwanda Saint Barthelemy Saint Helena Saint Kitts Saint Lucia Saint Maarten Saint Vincent Saipan San Marino Sao Tome and Principe Saudi Arabia Senegal Seychelles Sierra Leone Singapore Slovakia Slovenia Solomon Islands Somalia South Africa Spain Sri Lanka Sudan Suriname Swaziland Sweden Switzerland Syria Tahiti Taiwan Tajikistan Tanzania Thailand Togo Tonga Trinidad and Tobago Tunisia Turkey Turkmenistan Turks and Caicos Islands Tuvalu Uganda Ukraine United Arab Emirates United Kingdom Uruguay Uzbekistan Vanuatu Venezuela Vietnam Virgin Islands (U.K.) Virgin Islands (U.S.) Western Sahara Western Samoa Yemen Yugoslavia Zambia Zimbabwe (*) Postal Code: Preferred method of communication: email phone either Phone: Email: About how long have you known about The Sarcoma Alliance? Less than 1 month One to 6 months Six months to 1 year One to 3 years More than 3 years How did you first hear about The Sarcoma Alliance (SA) Peer-to-Peer Network ? SA Website Ad SA Message Board Post SA Online Chat Room SA Newsletter/Mailing Friends/Family Healthcare Provider Other If Other, please specify: (*) Are you: a sarcoma survivor close to someone affected by sarcoma
,
All fields preceded by (*) must be filled in.