function displayTwextra($screen_name = '') { //configuration parameters: $config_params = Config::getConfigParams(); $css = $config_params['css']; $tweet_size_max = $config_params['tweet_size_max']; $tweet_size_max_google = $config_params['tweet_size_max_google']; $hostname = $config_params['hostname']; $doctype = $config_params['doctype']; $html_attribute = $config_params['html_attribute']; $banner = banner('', 'banner'); //(user, banner_class) $footer = $config_params['footer']; // $docroot = $config_params['docroot']; $godaddy_analytics = $config_params['godaddy_analytics']; $debug = $config_params['debug']; $enable_stats = $config_params['enable_stats']; $show_maintenance_page = $config_params['show_maintenance_page']; $print_full_message_list = $config_params['print_full_message_list']; $search_len_max = $config_params['search_len_max']; $search_len_size = $config_params['search_len_size']; $search_count_offset = $config_params['search_count_offset']; if ($show_maintenance_page == 1) { maintenance_page(); } $script_path = __FUNCTION__; //save logs if ($enable_stats) { $model = new TwextraModel(); // $model->saveStat(); } if (isset($_REQUEST['message_from'])) { $message_from = $_REQUEST['message_from']; //validate data.. } else { $message_from = 0; } if (isset($_REQUEST['order'])) { $order = $_REQUEST['order']; //validate data.. } if (isset($_REQUEST['toggle'])) { if ($_REQUEST['asc_desc'] == 'asc') { $asc_desc = 'desc'; } else { $asc_desc = 'asc'; } } else { $asc_desc = $_REQUEST['asc_desc']; } //if not set, define the default values if (empty($order)) { $order = 'created'; } if (empty($asc_desc)) { $asc_desc = 'desc'; } if (isset($_REQUEST['less'])) { $next = 'less'; } else { $next = 'more'; } $search = $_REQUEST['search']; $model = new TwextraModel(); // //$message_id, $created, $view_count, $last_viewed, $prefix $length = 20; //number of messages to get $message_history = $model->get_twextra_search($screen_name, $message_from, $next, $order, $asc_desc, $length, $search); $msg_cnt = $message_history[0]['msg_cnt']; $msg_pages = ceil($msg_cnt / 20); $msg_current = ceil($message_from / 20) + 1; $msg_page_of_pages = "Page {$msg_current} of {$msg_pages}"; $model = new TwextraModel(); $user_info = $model->get_user_info($message_history[0]['message_id']); $display_remote_ip = trim($_SERVER['REMOTE_ADDR']); logger($script_path . " display_remote_ip: ", $display_remote_ip); //don't count twitter bot access for correct view count.. if ($_SERVER['REMOTE_ADDR'] == '128.242.241.134') { //$view_inc = false; return; } $screen_name = trim($user_info['screen_name']); //screen name of poster $name = trim($user_info['name']); $location = trim($user_info['location']); $description = trim($user_info['description']); $user_image_url = trim($user_info['user_image_url']); $message_totals = $model->get_message_totals(); //round to nearest thousand: $message_totals = $message_totals - $message_totals % 1000; //$message_totals = $message_totals - $search_count_offset; $message_totals = number_format($message_totals); //format into human readable form if (isset($_SESSION['profile_image_url'])) { $message_created_by = ""; //redundant, was used to concatenate profile_image_url } $message_created_by = " <span style='float:left'> Search results (Total: {$msg_cnt})</span>"; $message_created_by .= " <span style='float:right'>\n\t\t<input type='text' name='search' size='{$search_len_size}' maxlength='{$search_len_max}' value='{$search}' id='search' ></input>\n\t\t<input class='button_del' type='submit' value='Search Twextra' name='submit' />\n\t\t<input type='hidden' name='screen_name' value='{$screen_name}' />\n\t\t</span>"; $message_created_by .= "<br style='clear:both; width:100%' />"; //test $header = header_html($prefix); // //.......................................................... header("Pragma: no-cache"); header("cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past $message = ''; $message .= $doctype; $message .= "<html {$html_attribute} >\n"; $message .= $header; $message .= "<body>\n"; $message .= "<div class='p5_wrapper'>\n"; $message .= "<div class='p5_page'>\n"; $message .= $banner; $message .= "<div class='p5_main'>\n"; //p5_main $message .= "<div class='p5_main_inner'>\n"; //p5_main_inner $message .= "<div class='p5_tweet'>"; //p5_tweet $message .= "<h4> Search over {$message_totals} messages</h4>"; $message .= "<form method='post' action='/searchTwextra.php'>"; $message .= "<p style='text-align:center;font-weight:bold;' >{$message_created_by}</p>"; $message .= "</form>"; if ($msg_cnt > 0) { $message .= "<table class='p5_message_history' >"; $message .= "\n\t<tr>\n\t<th class='p5_th'>ID</th>\n\t<th class='p5_th'><a href='{$hostname}/searchTwextra.php?order=prefix&message_from=0&more&asc_desc={$asc_desc}&toggle&screen_name={$screen_name}&search={$search}'>\n\tMessage</a></th>\n\t<th class='p5_th'><a href='{$hostname}/searchTwextra.php?order=created&message_from=0&more&asc_desc={$asc_desc}&toggle&screen_name={$screen_name}&search={$search}'>\n\tCreated</a></th>\n\t<th class='p5_th'><a href='{$hostname}/searchTwextra.php?order=last_viewed&message_from=0&more&asc_desc={$asc_desc}&toggle&screen_name={$screen_name}&search={$search}'>\n\tLast Viewed</a></th>\n\t<th class='p5_th'><a href='{$hostname}/searchTwextra.php?order=views&message_from=0&more&asc_desc={$asc_desc}&toggle&screen_name={$screen_name}&search={$search}'>\n\tViews</a></th>\n\t</tr>\n\t"; $message_history_row = 'p5_message_history_row_odd'; $message_from_more = $message_from + 20; $message_from_less = $message_from - 20; if ($message_from_less < 0) { $message_from_less = 0; } $more = "<a href='{$hostname}/searchTwextra.php?message_from={$message_from_more}&more&order={$order}&asc_desc={$asc_desc}&screen_name={$screen_name}&search={$search}'\n\t >Next ></a>"; $less = "<a href='{$hostname}/searchTwextra.php?message_from={$message_from_less}&less&order={$order}&asc_desc={$asc_desc}&screen_name={$screen_name}&search={$search}'\n\t >< Previous</a>"; foreach ($message_history as $id => $message_entry) { if (!empty($message_entry['last_viewed'])) { //$message_last_viewed = date ( "Y-m-d", $message_entry ['last_viewed'] ); $message_last_viewed = last_viewed($message_entry['last_viewed']); } else { $message_last_viewed = ''; } $message_id = $message_entry['message_id']; $prefix_size_max = 130; $message_prefix = substr($message_entry['prefix'], 0, $prefix_size_max); if (strlen($message_prefix) == $prefix_size_max) { $message_prefix = $message_prefix . '...'; } $message_id_link = "<a href='{$hostname}/{$message_id}' target='_blank' >{$message_id}</a>"; $message .= "<tr class='{$message_history_row}' >\n\t\t <td class='p5_tc1' >" . $message_id_link . "</td>\n\t\t <td class='p5_tc2' >" . $message_prefix . "</td>\n\t\t <td class='p5_tc3' >" . $message_entry['created_date'] . "</td>\n\t\t <td class='p5_tc4' >" . $message_last_viewed . "</td>\n\t\t <td class='p5_tc5' >" . $message_entry['view_count'] . "</td>\n\t\t </tr>"; if ($message_history_row == 'p5_message_history_row_even') { $message_history_row = 'p5_message_history_row_odd'; } else { $message_history_row = 'p5_message_history_row_even'; } } if ($message_from == 0) { $less = ' '; } if (count($message_history) != 20) { $more = ''; } $message .= "</table>"; // $message .= "<div style='float:right;margin-top:10px;' > // <input class='button' type='submit' value='Delete' name='submit' onclick='return _delete()' /></div>"; } else { if ($search == '') { $message .= ""; } else { $message .= "<div style='text-align:center;'>No messages found with the phrase: {$search} \n\t\t </div>"; } } $message .= "<div style='margin-top:20px; font-weight:bold;'>"; //marker a if ($msg_cnt > 0) { $message .= "<div class='p5_pofp1' >{$less} {$more}</div>"; $message .= "<div class='p5_pofp2' >{$msg_page_of_pages}</div>"; } $message .= "<br style='clear:both;' />"; $message .= "</div>"; //marker a $message .= "</div>\n"; //p5_tweet echo $message; $message = ""; $message .= "<br style='clear:both;'>\n"; $message .= "</div>\n"; //p5_main_inner $message .= "<br style='clear:both;' />"; $message .= "</div>\n"; //p5_main $message .= $footer; $message .= "</div>\n"; //page $message .= "</div>\n"; //wrapper $message .= $godaddy_analytics; $message .= "</body>\n</html>\n"; echo $message; }
function display_content($screen_name = '') { //configuration parameters: $config_params = Config::getConfigParams(); $css = $config_params['css']; $tweet_size_max = $config_params['tweet_size_max']; $tweet_size_max_google = $config_params['tweet_size_max_google']; $hostname = $config_params['hostname']; $doctype = $config_params['doctype']; $html_attribute = $config_params['html_attribute']; $banner = banner('', 'banner'); //(user, banner_class) $footer = $config_params['footer']; // $docroot = $config_params['docroot']; $godaddy_analytics = $config_params['godaddy_analytics']; $debug = $config_params['debug']; $enable_stats = $config_params['enable_stats']; $script_path = __FUNCTION__; //save logs if ($enable_stats) { $model = new TwextraModel(); // $model->saveStat(); } $header = header_html($prefix); // //.......................................................... header("Pragma: no-cache"); header("cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past $message = ''; $message .= $doctype; $message .= "<html {$html_attribute} >\n"; $message .= $header; $message .= "<body>\n"; $message .= "<div class='p5_wrapper'>\n"; $message .= "<div class='p5_page'>\n"; $message .= $banner; $message .= "<div style='margin-left:auto;margin-right:auto;margin-bottom:20px;width:768px;font-size:0.8em;' >\n"; //p5_main $message .= "<h3>Contacting Twextra</h3>"; $message .= "If you have any problems, questions, or feedback send email to: "; $message .= "<br /><br />contact@twextra.com"; $message .= "<br style='clear:both;' />"; $message .= "</div>\n"; //p5_main $message .= $footer; $message .= "</div>\n"; //page $message .= "</div>\n"; //wrapper $message .= $godaddy_analytics; $message .= "</body>\n</html>\n"; echo $message; }
function display_about($screen_name = '') { //configuration parameters: $config_params = Config::getConfigParams(); $css = $config_params['css']; $tweet_size_max = $config_params['tweet_size_max']; $tweet_size_max_google = $config_params['tweet_size_max_google']; $hostname = $config_params['hostname']; $doctype = $config_params['doctype']; $html_attribute = $config_params['html_attribute']; $banner = banner('', 'banner'); //(user, banner_class) $footer = $config_params['footer']; // $docroot = $config_params['docroot']; $godaddy_analytics = $config_params['godaddy_analytics']; $debug = $config_params['debug']; $enable_stats = $config_params['enable_stats']; $script_path = __FUNCTION__; //save logs if ($enable_stats) { $model = new TwextraModel(); // $model->saveStat(); } $header = header_html($prefix); // //.......................................................... header("Pragma: no-cache"); header("cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past $message = ''; $message .= $doctype; $message .= "<html {$html_attribute} >\n"; $message .= $header; $message .= "<body>\n"; $message .= "<div class='p5_wrapper'>\n"; $message .= "<div class='p5_page'>\n"; $message .= $banner; $message .= "<div style='margin-left:auto;margin-right:auto;margin-bottom:20px;width:768px;font-size:0.8em;' >\n"; //p5_main $message .= "<h3>About Twextra</h3>"; $message .= "Ever wish you could write a message longer than 140 characters on\nTwitter or Linkedin? Well, that's exactly what Twextra enables,\nplus much more. Take a look at Twextra's features:\n<ul style='margin:0px 0px 10px 25px'>\n<li>\n<span style='background-color:yellow;'>Super-size</span> - With Twextra you can create huge messages of up to\n<i>100,000 characters</i>.\n</li>\n\n<li>\n<span style='background-color:yellow;'>Rich-text</span> - Create messages with formatting such as<i> bold, italic,\nunderline, colored-text, emoticons, </i>etc.\n</li>\n<li>\n<span style='background-color:yellow;'>Multi-media</span> - Embed <i>videos</i> and <i>images</i> into your messages to enable more interesting communication.\n</li>\n</ul>\n\nGive Twextra a try today!"; $message .= "<br style='clear:both;' />"; $message .= "</div>\n"; //p5_main $message .= $footer; $message .= "</div>\n"; //page $message .= "</div>\n"; //wrapper $message .= $godaddy_analytics; //$message .= phpinfo(); $message .= "</body>\n</html>\n"; echo $message; }
function display_maintenance_page($screen_name = '') { //configuration parameters: $config_params = Config::getConfigParams(); $css = $config_params['css']; $tweet_size_max = $config_params['tweet_size_max']; $tweet_size_max_google = $config_params['tweet_size_max_google']; $hostname = $config_params['hostname']; $doctype = $config_params['doctype']; $html_attribute = $config_params['html_attribute']; $banner = banner('', 'banner'); //(user, banner_class) $footer = $config_params['footer']; // $docroot = $config_params['docroot']; $godaddy_analytics = $config_params['godaddy_analytics']; $debug = $config_params['debug']; $enable_stats = $config_params['enable_stats']; $script_path = __FUNCTION__; //save logs if ($enable_stats) { $model = new TwextraModel(); // $model->saveStat(); } $header = header_html($prefix); // //.......................................................... header("Pragma: no-cache"); header("cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past $message = ''; $message .= $doctype; $message .= "<html {$html_attribute} >\n"; $message .= $header; $message .= "<body>\n"; $message .= "<div class='p5_wrapper'>\n"; $message .= "<div class='p5_page'>\n"; $message .= $banner; $message .= "<div style='margin:80px auto;width:768px;font-size:1.0em;' >\n"; //p5_main $message .= "<h3 style='background-color:#ee1111;width:350px;padding-left:20px;' >Twextra is Down for Maintenance</h3>"; $message .= "Twextra is currently down for maintenance. Please check back in a few hours."; $message .= "<br style='clear:both;' />"; $message .= "</div>\n"; //p5_main $message .= $footer; $message .= "</div>\n"; //page $message .= "</div>\n"; //wrapper $message .= $godaddy_analytics; $message .= "</body>\n</html>\n"; echo $message; }
function windex() { if (session_id() == "") { session_start(); } logger($script_path . " index start:"); validate_access_webnotes(); //configuration parameters: $config_params = Config::getConfigParams(); $hostname = $config_params['hostname']; $watch_demo = $config_params['watch_demo']; $docroot = $config_params['docroot']; $debug = $config_params['debug']; $header = header_html(); // $footer = $config_params['footer']; $doctype = $config_params['doctype']; $html_attribute = $config_params['html_attribute']; $css = $config_params['css']; $google_analytics = $config_params['google_analytics']; $godaddy_analytics = $config_params['godaddy_analytics']; $cookie_name = $config_params['cookie_name']; $ep4 = $config_params['ep4']; $docroot = $_SERVER['DOCUMENT_ROOT']; // if (isset($_REQUEST['weditor'])) { // $user = '******'; // $note = $_REQUEST['weditor']; // $tag = $_REQUEST['tag']; // $action = $_REQUEST['action']; // $wid = $_REQUEST['wid']; // print_r($_REQUEST); exit; // $model = new TwextraModel(); // $model->saveNote($user, $note, $tag, $action, $wid); // } header("Pragma: no-cache"); header("cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past print $doctype; print "<html {$html_attribute} >"; $message = "\n<head>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"{$css}\" />\n<title>Twextra- When you NEED more than 140 characters</title>"; echo $message; $scripts = ''; $scripts .= "<script type='text/javascript' src='/scripts/jquery/jquery-1.2.6.js'></script>\n"; echo $scripts; $message = "\n<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/favicon.ico\" />\n</head>\n<body>\n<div class='wrapper'>\n<div class='page'>"; echo $message; $banner = banner($screen_name, 'banner_index'); //(user, banner_class) echo $banner; $message = "<div style='float:left;clear:both;margin-left:auto;margin-right:auto;width:800px;'>\n<div style='margin-left:100px;'><a href='{$hostname}/webnotes/wrouter.php?wroute=create'>Create a webnote</a></div>\n<div style='margin-left:100px;'><a href='{$hostname}/webnotes/wrouter.php?wroute=display'>Display webnotes</a></div>\n<div style='margin-left:100px;'><a href='{$hostname}/webnotes/wrouter.php?wroute=search'>Search webnotes</a></div>\n</div>"; echo $message; echo $footer; $message = "\n</div>\n</div>\n</body>\n</html>"; echo $message; }
function display_privacy($screen_name = '') { //configuration parameters: $config_params = Config::getConfigParams(); $css = $config_params['css']; $tweet_size_max = $config_params['tweet_size_max']; $tweet_size_max_google = $config_params['tweet_size_max_google']; $hostname = $config_params['hostname']; $doctype = $config_params['doctype']; $html_attribute = $config_params['html_attribute']; $banner = banner('', 'banner'); //(user, banner_class) $footer = $config_params['footer']; // $docroot = $config_params['docroot']; $godaddy_analytics = $config_params['godaddy_analytics']; $debug = $config_params['debug']; $enable_stats = $config_params['enable_stats']; $script_path = __FUNCTION__; //save logs if ($enable_stats) { $model = new TwextraModel(); // $model->saveStat(); } $header = header_html($prefix); // //.......................................................... header("Pragma: no-cache"); header("cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past $message = ''; $message .= $doctype; $message .= "<html {$html_attribute} >\n"; $message .= $header; $message .= "<body>\n"; $message .= "<div class='p5_wrapper'>\n"; $message .= "<div class='p5_page'>\n"; $message .= $banner; $message .= "<div style='margin-left:auto;margin-right:auto;margin-bottom:20px;width:768px;font-size:0.8em;' >\n"; //p5_main $message .= "<div class='info2'>\n<h2>Privacy Policy</h2>\n<div class='info'>\nOur Privacy Policy is designed to assist you in understanding how we collect and use the personal information you provide to us and to assist you in making informed decisions when using our site and our products and services.\n</div>\n<h3>What Information Do We Collect?</h3>\n<div class='info'>\nWhen you visit our Web site you may provide us with two types of information: personal information you knowingly choose to disclose that is collected on an individual basis and Web site use information collected on an aggregate basis as you and others browse our Web site.\n</div>\n<h3> 1.\tPersonal Information You Choose to Provide</h3>\n\n<h4>Registration Information</h4>\n\n<div class='info'>\nYou will provide us information about yourself when you register to be a member of twextra.com, register for certain services, or register for email newsletters and alerts. You may also provide additional comments on how you see twextra.com servicing your needs and interests.\n</div>\n<h4> Email Information</h4>\n<div class='info'>\nIf you choose to correspond with us through email, we may retain the content of your email messages together with your email address and our responses. \n</div>\n<h3> 2.\tWeb Site Use Information</h3>\n<div class='info'>\nSimilar to other commercial Web sites, our Web site utilizes a standard technology called \"cookies\" (see explanation below, \"What Are Cookies?\") and Web server logs to collect information about how our Web site is used. Information gathered through cookies and Web server logs may include the date and time of visits, the pages viewed, time spent at our Web site, and the Web sites visited just before and just after our Web site. We, our advertisers and ad serving companies may also use small technology or pieces of code to determine which advertisements and promotions users have seen and how users responded to them.\n</div>\n<h3>How Do We Use the Information That You Provide to Us?</h3>\n\n<div class='info'>\nBroadly speaking, we use personal information for purposes of administering and expanding our business activities, providing customer service and making available other products and services to our customers and prospective customers. Occasionally, we may also use the information we collect to notify you about important changes to our Web site, new services and special offers we think you will find valuable. You may notify us at any time if you do not wish to receive these offers by emailing us at contact@twextra.com.\n</div>\n<h3> What Are Cookies?</h3>\n<div class='info'>\nA cookie is a very small text document, which often includes an anonymous unique identifier. When you visit a Web site, that site's computer asks your computer for permission to store this file in a part of your hard drive specifically designated for cookies. Each Web site can send its own cookie to your browser if your browser's preferences allow it, but (to protect your privacy) your browser only permits a Web site to access the cookies it has already sent to you, not the cookies sent to you by other sites. Some of our business partners (e.g., advertisers) use cookies that originate from their sites. We have no access or control over those cookies. \n</div>\n\n<h3> How Do We Use Information We Collect from Cookies?</h3>\n<div class='info'>\nAs you use our Web site, the site uses its cookies to differentiate you from other users. In some cases, we also use cookies to prevent you from logging in more than is necessary for security. Cookies, in conjunction with our Web server's log files, allow us to calculate the aggregate number of people visiting our Web site and which parts of the site are most popular. This helps us gather feedback in order to constantly improve our Web site and better serve our customers.\n</div>\n<h3> Sharing Information with Third Parties</h3>\n\n<div class='info'>\nWe may enter into alliances, partnerships or other business arrangements with third parties who may be given access to personal information including your name, address, telephone number and email for the purpose of providing you information regarding products and services that we think will be of interest to you. In connection with alliances, partnerships or arrangements, we may also provide certain information to third parties if we have determined that the information will be used in a responsible manner by a responsible third party. For example, some of our partners operate stores or provide services on our site, while others power offerings developed by us for your use. We may also use third parties to facilitate our business, including, but not limited to, sending email and processing credit card payments. In connection with these offerings and business operations, our partners and other third parties may have access to your personal information for use in connection with business activities. As we develop our business, we may buy or sell assets or business offerings. Customer, email, and visitor information is generally one of the transferred business assets in these types of transactions. We may also transfer such information in the course of corporate divestitures, mergers, or any dissolution.\n</div>\n<h3> Notice of New Services and Changes</h3>\n<div class='info'>\nOccasionally, we may also use the information we collect to notify you about important changes to our Web site, new services and special offers we think you will find valuable. As our customer, you will be given the opportunity to notify us of your desire not to receive these offers by sending us an email request at contact@twextra.com.\n</div>\n<h3> How Do We Protect Your Information? How Do We Secure Information Transmissions?</h3>\n<div class='info'>\nEmail is not recognized as a secure medium of communication. For this reason, we request that you do not send private information to us by email. Some of the information you may enter on our Web site may be transmitted securely via Secure Sockets Layer SSL encryption services. Pages utilizing this technology will have URLs that start with HTTPS instead of HTTP. Please contact contact@twextra.com if you have any questions or concerns.\n</div>\n<h3> How Can You Access and Correct Your Information?</h3>\n\n<div class='info'>\nYou may request access to all your personally identifiable information that we collect online and maintain in our database by emailing \ncontact@twextra.com.\n</div>\n<h3> Certain Disclosures</h3>\n<div class='info'>\nWe may disclose your personal information if required to do so by law or subpoena or if we believe that such action is necessary to (a) conform to the law or comply with legal process served on us or affiliated parties; (b) protect and defend our rights and property, our site, the users of our site, and/or our affiliated parties; (c) act under circumstances to protect the safety of users of our site, us, or third parties.\n</div>\n<h3> What About Other Web Sites Linked to Our Web Site?</h3>\n<div class='info'>\nWe are not responsible for the practices employed by Web sites linked to or from our Web site nor the information or content contained therein. Often links to other Web sites are provided solely as pointers to information on topics that may be useful to the users of our Web site. \nPlease remember that when you use a link to go from our Web site to another Web site, our Privacy Policy is no longer in effect. Your browsing and interaction on any other Web site, including Web sites which have a link on our Web site, is subject to that Web site's own rules and policies. Please read over those rules and policies before proceeding.\n</div>\n<h3> Your Consent</h3>\n\n<div class='info'>\nBy using our Web site you consent to our collection and use of your personal information as described in this Privacy Policy. If we change our privacy policies and procedures, we will post those changes on our Web site to keep you aware of what information we collect, how we use it and under what circumstances we may disclose it.\n</div>\n</div>\n"; $message .= "<br style='clear:both;' />"; $message .= "</div>\n"; //p5_main $message .= $footer; $message .= "</div>\n"; //page $message .= "</div>\n"; //wrapper $message .= $godaddy_analytics; $message .= "</body>\n</html>\n"; echo $message; }
function display_about($screen_name = '') { //configuration parameters: $config_params = Config::getConfigParams(); $css = $config_params['css']; $tweet_size_max = $config_params['tweet_size_max']; $tweet_size_max_google = $config_params['tweet_size_max_google']; $hostname = $config_params['hostname']; $doctype = $config_params['doctype']; $html_attribute = $config_params['html_attribute']; $banner = banner('', 'banner'); //(user, banner_class) $footer = $config_params['footer']; // $docroot = $config_params['docroot']; $godaddy_analytics = $config_params['godaddy_analytics']; $debug = $config_params['debug']; $enable_stats = $config_params['enable_stats']; $script_path = __FUNCTION__; //save logs if ($enable_stats) { $model = new TwextraModel(); // $model->saveStat(); } $header = header_html($prefix); // //.......................................................... header("Pragma: no-cache"); header("cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past $message = ''; $message .= $doctype; $message .= "<html {$html_attribute} >\n"; $message .= $header; $message .= "<body>\n"; $message .= "<div class='p5_wrapper'>\n"; $message .= "<div class='p5_page'>\n"; $message .= $banner; $message .= "<div style='margin-left:auto;margin-right:auto;margin-bottom:20px;width:768px;font-size:0.8em;' >\n"; //p5_main $message .= "<div class='info2'>\n<h2>Terms of Use Agreement</h2>\n<div class='info'>\nWelcome to our Web site. By using our site, you are agreeing to comply with and be bound by the following terms of use. \nPlease review the following terms carefully. If you do not agree to these terms, you should not use this site. \nThe term 'Twextra' refers to Viewista, Inc., the owner of the Web site. \nThe term 'you' refers to the user or viewer of our Web Site.\n</div>\n<h3> Acceptance of Agreement</h3>\n<div class='info'>\nYou agree to the terms and conditions outlined in this Terms of Use Agreement (\"Agreement\") with respect to our site \n(the \"Site\"). This Agreement constitutes the entire and only agreement between us and you, and supersedes all prior or \ncontemporaneous agreements, representations, warranties and understandings with respect to the Site, the content, products \nor services provided by or through the Site, and the subject matter of this Agreement. This Agreement may be amended at any \ntime by us from time to time without specific notice to you. The latest Agreement will be posted on the Site, and you should \nreview this Agreement prior to using the Site.\n</div>\n<h3>\tCopyright</h3>\n<div class='info'>\n\nThe content, organization, graphics, design, compilation, magnetic translation, digital conversion and other matters related \nto the Site are protected under applicable copyrights, trademarks and other proprietary (including but not limited to \nintellectual property) rights. The copying, redistribution, use or publication by you of any such matters or any part of the \nSite, except as allowed by Section \"Limited License; Permitted Uses\" below, is strictly prohibited. You do not acquire \nownership rights to any content, document or other materials viewed through the Site. The posting of information or materials \non the Site does not constitute a waiver of any right in such information and materials. Some of the content on the site is \nthe copyrighted work of third parties.\n</div>\n<h3>\tService Marks</h3>\n<div class='info'>\n\"twextra.com\" and others are our service marks or registered service marks or trademarks. Other product and company names \nmentioned on the Site may be trademarks of their respective owners.\n</div>\n<h3>\tLimited License; Permitted Uses</h3>\n<div class='info'>\nYou are granted a non-exclusive, non-transferable, revocable license (a) to access and use the Site strictly in accordance with \nthis Agreement; (b) to use the Site solely for internal, personal, non-commercial purposes; and (c) to print out discrete \ninformation from the Site solely for internal, personal, non-commercial purposes and provided that you maintain all copyright \nand other policies contained therein. No print out or electronic version of any part of the Site or its contents may be used \nby you in any litigation or arbitration matter whatsoever under any circumstances.\n</div>\n<h3>\tRestrictions and Prohibitions on Use</h3>\n\n<div class='info'>\nYour license for access and use of the Site and any information, materials or documents (collectively defined as 'Content \nand Materials') therein are subject to the following restrictions and prohibitions on use: You may not (a) copy, print \n(except for the express limited purpose permitted by Section 4 above), republish, display, distribute, transmit, sell, rent, \nlease, loan or otherwise make available in any form or by any means all or any portion of the Site or any Content and Materials \nretrieved therefrom; (b) use the Site or any materials obtained from the Site to develop, of as a component of, any information, \nstorage and retrieval system, database, information base, or similar resource (in any media now existing or hereafter developed), \nthat is offered for commercial distribution of any kind, including through sale, license, lease, rental, subscription, or any \nother commercial distribution mechanism; (c) create compilations or derivative works of any Content and Materials from the Site; \n(d) use any Content and Materials from the Site in any manner that may infringe any copyright, intellectual property right, \nproprietary right, or property right of us or any third parties; (e) remove, change or obscure any copyright notice or other \nproprietary notice or terms of use contained in the Site; (f) make any portion of the Site available through any timesharing \nsystem, service bureau, the Internet or any other technology now existing or developed in the future; (g) remove, decompile, \ndisassemble or reverse engineer any Site software or use any network monitoring or discovery software to determine the Site \narchitecture; (h) use any automatic or manual process to harvest information from the Site; (i) use the Site for the purpose of \ngathering information for or transmitting (1) unsolicited commercial email; (2) email that makes use of headers, invalid or \nnonexistent domain names, or other means of deceptive addressing; and (3) unsolicited telephone calls or facsimile transmissions; \n(j) use the Site in a manner that violates any state or federal law regulating email, facsimile transmissions or telephone \nsolicitations; and (k) export or re-export the Site or any portion thereof, or any software available on or through the Site, \nin violation of the export control laws or regulations of the United States.\n</div>\n<h3>\tForms, Agreements & Documents</h3>\n<div class='info'>\nWe may make available through the Site or through other Web sites sample and actual forms, checklists, business documents and \nlegal documents (collectively, 'Documents'). All Documents are provided on a non-exclusive license basis only for your \npersonal one-time use for non-commercial purposes, without any right to re-license, sublicense, distribute, assign or transfer \nsuch license. Documents are provided for a charge and without any representations or warranties, express or implied, as to \ntheir suitability, legal effect, completeness, currentness, accuracy, and/or appropriateness. THE DOCUMENTS ARE PROVIDED 'AS \nIS', 'AS AVAILABLE', AND WITH 'ALL FAULTS', AND WE AND ANY PROVIDER OF THE DOCUMENTS DISCLAIM ANY WARRANTIES, \nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. The Documents may be \ninappropriate for your particular circumstances. Furthermore, state laws may require different or additional provisions to \nensure the desired result. You should consult with legal counsel to determine the appropriate legal or business documents \nnecessary for your particular transactions, as the Documents are only samples and may not be applicable to a particular \nsituation. Some Documents are public domain forms or available from public records.\n</div>\n<h3>\tNo Legal Advice or Attorney-Client Relationship</h3>\n<div class='info'>\nInformation contained on or made available through the Site is not intended to and does not constitute legal advice, \nrecommendations, mediation or counseling under any circumstance and no attorney-client relationship is formed. We do not \nwarrant or guarantee the accurateness, completeness, adequacy or currency of the information contained in or linked to the Site. \nYour use of information on the Site or materials linked to the Site is entirely at your own risk. We are not a law firm and \nthe Site is not a lawyer referral service.\n\n</div>\n<h3>\tLinking to the Site</h3>\n<div class='info'>\nYou may provide links to the Site, provided (a) that you do not remove or obscure, by framing or otherwise, advertisements, \nthe copyright notice, or other notices on the Site, (b) your site does not engage in illegal or pornographic activities, and \n(c) you discontinue providing links to the Site immediately upon request by us.\n</div>\n<h3>\tAdvertisers</h3>\nThe Site may contain advertising and sponsorships. Advertisers and sponsors are responsible for ensuring that material \nsubmitted for inclusion on the Site is accurate and complies with applicable laws. We are not responsible for the illegality \nor any error, inaccuracy or problem in the advertiser's or sponsor's materials.\n\n<h3>\tRegistration</h3>\n<div class='info'>\nCertain sections of, or offerings from, the Site may require you to register. If registration is requested, you agree to \nprovide us with accurate, complete registration information. Your registration must be done using your real email address \nand accurate information. Each registration is for your personal use only and not on behalf of any other person or entity. \nWe do not permit (a) any other person using the registered sections under your name; or (b) access through a single name \nbeing made available to multiple users on a network. You are responsible for preventing such unauthorized use.\n\n</div>\n<h3>\tErrors, Corrections and Changes</h3>\n<div class='info'>\nWe do not represent or warrant that the Site will be error-free, free of viruses or other harmful components, or that \ndefects will be corrected. We do not represent or warrant that the information available on or through the Site will be \ncorrect, accurate, timely or otherwise reliable. We may make changes to the features, functionality or content of the Site \nat any time. We reserve the right in our sole discretion to edit or delete any documents, information or other content \nappearing on the Site.\n</div>\n<h3>\tThird Party Content</h3>\n<div class='info'>\nOur site provides access to Third party content. We are not responsible for and assume no liability for any mistakes, \nmisstatements of law, defamation, omissions, falsehood, obscenity, pornography or profanity in the statements, opinions, \nrepresentations or any other form of content on the Site. You understand that the information and opinions in the third \nparty content represent solely the thoughts of the author and is neither endorsed by nor does it necessarily reflect our belief.\n</div>\n<h3>\tUnlawful Activity</h3>\n\n<div class='info'>\nWe reserve the right to investigate complaints or reported violations of this Agreement and to take any action we deem \nappropriate, including but not limited to reporting any suspected unlawful activity to law enforcement officials, regulators, \nor other third parties and disclosing any information necessary or appropriate to such persons or entities relating to your \nprofile, email addresses, usage history, posted materials, IP addresses and traffic information.\n</div>\n<h3>\tIndemnification</h3>\n<div class='info'>\nYou agree to indemnify, defend and hold us and our partners, agents, officers, directors, employees, subcontractors, \nsuccessors, assigns, third party suppliers of information and documents, attorneys, advertisers, product and service \nproviders, and affiliates (collectively, \"Affiliated Parties\") harmless from any liability, loss, claim and expense, \nincluding reasonable attorney's fees, related to your violation of this Agreement or use of the Site. \n</div>\n<h3>\tNontransferable</h3>\n<div class='info'>\nYour right to use the Site is not transferable or assignable. Any password or right given to you to obtain information or \ndocuments is not transferable or assignable.\n</div>\n<h3>\tDisclaimer</h3>\n\n<div class='info'>\nTHE INFORMATION, CONTENT AND DOCUMENTS FROM OR THROUGH THE SITE ARE PROVIDED \"AS-IS,\" \"AS AVAILABLE,\" WITH 'ALL FAULTS', \nAND ALL WARRANTIES, EXPRESS OR IMPLIED, ARE DISCLAIMED (INCLUDING BUT NOT LIMITED TO THE DISCLAIMER OF ANY IMPLIED WARRANTIES \nOF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE). THE INFORMATION AND SERVICES MAY CONTAIN BUGS, ERRORS, PROBLEMS OR \nOTHER LIMITATIONS. WE AND OUR AFFILIATED PARTIES HAVE NO LIABILITY WHATSOEVER FOR YOUR USE OF ANY INFORMATION OR SERVICE, \nEXCEPT AS PROVIDED IN SECTION 17(b). IN PARTICULAR, BUT NOT AS A LIMITATION THEREOF, WE AND OUR AFFILIATED PARTIES ARE NOT \nLIABLE FOR ANY INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING DAMAGES FOR LOSS OF BUSINESS, LOSS OF PROFITS, \nLITIGATION, OR THE LIKE), WHETHER BASED ON BREACH OF CONTRACT, BREACH OF WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCT \nLIABILITY OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THE NEGATION AND LIMITATION OF DAMAGES SET FORTH \nABOVE ARE FUNDAMENTAL ELEMENTS OF THE BASIS OF THE BARGAIN BETWEEN US AND YOU. THIS SITE AND THE PRODUCTS, SERVICES, DOCUMENTS \nAND INFORMATION PRESENTED WOULD NOT BE PROVIDED WITHOUT SUCH LIMITATIONS. NO ADVICE OR INFORMATION, WHETHER ORAL OR WRITTEN, \nOBTAINED BY YOU FROM US THROUGH THE SITE OR OTHERWISE SHALL CREATE ANY WARRANTY, REPRESENTATION OR GUARANTEE NOT EXPRESSLY \nSTATED IN THIS AGREEMENT. \n\nALL RESPONSIBILITY OR LIABILITY FOR ANY DAMAGES CAUSED BY VIRUSES CONTAINED WITHIN THE ELECTRONIC FILE CONTAINING A FORM OR \nDOCUMENT IS DISCLAIMED. \n</div>\n<h3>\tLimitation of Liability</h3>\n<div class='info'>\n\t(a)\tWe and any Affiliated Party shall not be liable for any loss, injury, claim, liability, or damage of any kind \n\tresulting in any way from (a) any errors in or omissions from the Site or any services or products obtainable therefrom, \n\t(b) the unavailability or interruption of the Site or any features thereof, (c) your use of the Site, (d) the content \n\tcontained on the Site, or (e) any delay or failure in performance beyond the control of a Covered Party.\n\n(b)\tTHE AGGREGATE LIABILITY OF US AND THE AFFILIATED PARTIES IN CONNECTION WITH ANY CLAIM ARISING OUT OF OR RELATING TO THE \nSITE AND/OR THE PRODUCTS, INFORMATION, DOCUMENTS AND SERVICES PROVIDED HEREIN OR HEREBY SHALL NOT EXCEED \$100 AND THAT AMOUNT \nSHALL BE IN LIEU OF ALL OTHER REMEDIES WHICH YOU MAY HAVE AGAINST US AND ANY AFFILIATED PARTY.\n</div>\n<h3>\tUse of Information</h3>\n<div class='info'>\nWe reserve the right, and you authorize us, to the use and assignment of all information regarding Site uses by you and all \ninformation provided by you in any manner consistent with our Privacy Policy. All remarks, suggestions, ideas, graphics, or \nother information communicated by you to us (collectively, a \"Submission\") will forever be our property. We will not be \nrequired to treat any Submission as confidential, and will not be liable for any ideas (including without limitation, product, \nservice or advertising ideas) and will not incur any liability as a result of any similarities that may appear in our future \nproducts, services or operations. Without limitation, we will have exclusive ownership of all present and future existing rights \nto the Submission of every kind and nature everywhere. We will be entitled to use the Submission for any commercial or other \npurpose whatsoever, without compensation to you or any other person sending the Submission. You acknowledge that you are \nresponsible for whatever material you submit, and you, not us, have full responsibility for the message, including its \nlegality, reliability, appropriateness, originality, and copyright.\n</div>\n<h3>\tThird-Party Services</h3>\n\n<div class='info'>\nWe may allow access to or advertise certain third-party product or service providers (\"Merchants\") from which you may \npurchase certain goods or services. You understand that we do not operate or control the products or services offered by \nMerchants. Merchants are responsible for all aspects of order processing, fulfillment, billing and customer service. We are \nnot a party to the transactions entered into between you and Merchants. You agree that use of or purchase from such Merchants \nis AT YOUR SOLE RISK AND IS WITHOUT WARRANTIES OF ANY KIND BY US, EXPRESSED, IMPLIED OR OTHERWISE INCLUDING WARRANTIES OF TITLE, \nFITNESS FOR PURPOSE, MERCHANTABILITY OR NON-INFRINGEMENT. UNDER NO CIRCUMSTANCES ARE WE LIABLE FOR ANY DAMAGES ARISING FROM THE \nTRANSACTIONS BETWEEN YOU AND MERCHANTS OR FOR ANY INFORMATION APPEARING ON MERCHANT SITES OR ANY OTHER SITE LINKED TO OUR SITE.\n</div>\n<h3>\tThird-Party Merchant Policies</h3>\n<div class='info'>\nAll rules, policies (including privacy policies) and operating procedures of Merchants will apply to you while on any Merchant \nsites. We are not responsible for information provided by you to Merchants. We and the Merchants are independent contractors \nand neither party has authority to make any representations or commitments on behalf of the other.\n</div>\n<h3>\tPrivacy Policy</h3>\n<div class='info'>\nOur Privacy Policy, as it may change from time to time, is a part of this Agreement. You must review this Privacy Policy by \nclicking on<a href=\"privacy.php\"> this</a> link.\n\n</div>\n<h3>\tPayments</h3>\n<div class='info'>\nYou represent and warrant that if you are purchasing something from us or from Merchants that (i) any credit information you \nsupply is true and complete, (ii) charges incurred by you will be honored by your credit card company, and (iii) you will pay \nthe charges incurred by you at the posted prices, including any applicable taxes.\n</div>\n<h3>\tSecurities Laws</h3>\n<div class='info'>\nThe Site may include statements concerning our operations, prospects, strategies, financial condition, future economic \nperformance and demand for our products or services, as well as our intentions, plans and objectives (particularly with \nrespect to product and service offerings), that are forward-looking statements. These statements are based upon a number of \nassumptions and estimates which are subject to significant uncertainties, many of which are beyond our control. When used on \nour Site, words like \"anticipates,\" \"expects,\" \"believes,\" \"estimates,\" \"seeks,\" \"plans,\" \"intends,\" \"will\" \nand similar expressions are intended to identify forward-looking statements designed to fall within securities law safe \nharbors for forward-looking statements. The Site and the information contained herein does not constitute an offer or a \nsolicitation of an offer for sale of any securities. None of the information contained herein is intended to be, and shall \nnot be deemed to be, incorporated into any of our securities-related filings or documents.\n</div>\n<h3>\tLinks to other Web Sites</h3>\n<div class='info'>\n\nThe Site contains links to other Web sites. We are not responsible for the content, accuracy or opinions expressed in such Web \nsites, and such Web sites are not investigated, monitored or checked for accuracy or completeness by us. Inclusion of any linked \nWeb site on our Site does not imply approval or endorsement of the linked Web site by us. If you decide to leave our Site and \naccess these third-party sites, you do so at your own risk.\n</div>\n\n<h3>\tInformation and Press Releases</h3>\n<div class='info'>\nThe Site contains information and press releases about us. We disclaim any duty or obligation to update this information or \nany press releases. Information about companies other than ours contained in the press release or otherwise, should not be \nrelied upon as being provided or endorsed by us.\n</div>\n<h3>\tLegal Compliance</h3>\n<div class='info'>\nYou agree to comply with all applicable domestic and international laws, statutes, ordinances and regulations regarding your \nuse of the Site and the Content and Materials provided therein.\n</div>\n</div>\n\n"; $message .= "<br style='clear:both;' />"; $message .= "</div>\n"; //p5_main $message .= $footer; $message .= "</div>\n"; //page $message .= "</div>\n"; //wrapper $message .= $godaddy_analytics; $message .= "</body>\n</html>\n"; echo $message; }
function search_display() { if (session_id() == "") { session_start(); } logger($script_path . " index start:"); validate_access_webnotes(); //configuration parameters: $config_params = Config::getConfigParams(); $hostname = $config_params['hostname']; $watch_demo = $config_params['watch_demo']; $docroot = $config_params['docroot']; $debug = $config_params['debug']; $header = header_html(); // $footer = $config_params['footer']; $doctype = $config_params['doctype']; $html_attribute = $config_params['html_attribute']; $css = $config_params['css']; $google_analytics = $config_params['google_analytics']; $godaddy_analytics = $config_params['godaddy_analytics']; $cookie_name = $config_params['cookie_name']; $ep4 = $config_params['ep4']; $docroot = $_SERVER['DOCUMENT_ROOT']; header("Pragma: no-cache"); header("cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past print $doctype; print "<html {$html_attribute} >"; $message = "\n\n<head>\n\n<link rel=\"stylesheet\" type=\"text/css\" href=\"{$css}\" />\n\n<title>Twextra- When you NEED more than 140 characters</title>"; echo $message; $scripts = ''; $scripts .= "<script type='text/javascript' src='/scripts/jquery/jquery-1.2.6.js'></script>\n"; echo $scripts; $message = "\n\n<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/favicon.ico\" />\n\n</head>\n\n<body>\n\n<div class='wrapper'>\n\n<div class='page'>"; echo $message; $banner = banner($screen_name, 'banner_index'); //(user, banner_class) echo $banner; $message = "<div style='float:left;clear:both;margin-left:auto;margin-right:auto;width:800px;'><form method='post' \n\naction='/webnotes/wrouter.php' accept-charset=\"utf-8\" >\n\n\t<input type='hidden' name='wroute' id='wroute' value='searchdisplay'> </input>\n\n\n\n\t<input id='tag' name='tag' style='width: 768px; border:solid black 1px;'></input> \n\n<div><input type='submit' name='save' id='save' value='Search' class='button'></input></div>\n\n\n\n</form></div>"; echo $message; echo $footer; $message = "\n\n</div>\n\n</div>\n\n</body>\n\n</html>"; echo $message; }
function display_howto($screen_name = '') { //configuration parameters: $config_params = Config::getConfigParams(); $css = $config_params['css']; $tweet_size_max = $config_params['tweet_size_max']; $tweet_size_max_google = $config_params['tweet_size_max_google']; $hostname = $config_params['hostname']; $doctype = $config_params['doctype']; $html_attribute = $config_params['html_attribute']; $banner = banner('', 'banner'); //(user, banner_class) $footer = $config_params['footer']; // $docroot = $config_params['docroot']; $godaddy_analytics = $config_params['godaddy_analytics']; $debug = $config_params['debug']; $enable_stats = $config_params['enable_stats']; $script_path = __FUNCTION__; //save logs if ($enable_stats) { $model = new TwextraModel(); // $model->saveStat(); } $header = header_html($prefix); // //.......................................................... header("Pragma: no-cache"); header("cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past $message = ''; $message .= $doctype; $message .= "<html {$html_attribute} >\n"; $message .= $header; $message .= "<body>\n"; $message .= "<div class='p5_wrapper'>\n"; $message .= "<div class='p5_page'>\n"; $message .= $banner; $message .= "<div style='margin-left:auto;margin-right:auto;margin-bottom:20px;width:768px;font-size:0.8em;padding-top:20px;' >\n"; //p5_main $message .= "<h2 style='text-decoration:underline;'>How To</h2>"; $message .= "<div>Here you will find help for the more advanced features of Twextra.</div>"; // $message .= '<ol style="clear:both;font-size:1.0em;padding-bottom:30px;border-bottom:1px solid black;" > <li> <a href="#embed_video">Embedding Videos Into Twextra</a></li> <li> <a href="#embed_image">Embedding Images Into Twextra</a></li> <li> <a href="#contents">Creating A Table Of Contents In Twextra</a></li> <li> <a href="#embed_html">Embedding HTML Code Into Twextra</a></li> </ol> '; $message .= ' <ol style="clear:both;margin-top:50px;font-size:1.5em;" > <a name="embed_video"></a> <li> Embedding Videos Into Twextra <p><object width="576" height="462"><param name="movie" value="http://www.youtube.com/v/Ju2X-Q22krg?fs=1&hl=en_US"></param> <param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param> <embed src="http://www.youtube.com/v/Ju2X-Q22krg?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="576" height="462"></embed></object> </p> </li> <a name="embed_image"></a> <li> Embedding Images Into Twextra <p> <object width="576" height="462"><param name="movie" value="http://www.youtube.com/v/qRecMbTu3ek?fs=1&hl=en_US"> </param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param> <embed src="http://www.youtube.com/v/qRecMbTu3ek?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="576" height="462"></embed></object> </p> </li> <a name="contents"></a> <li> Creating A Table Of Contents In Twextra <p> <object width="576" height="462"><param name="movie" value="http://www.youtube.com/v/ICLBsumCFNA?fs=1&hl=en_US"></param> <param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param> <embed src="http://www.youtube.com/v/ICLBsumCFNA?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="576" height="462"></embed></object> </p> </li> <a name="embed_html"></a> <li> Embedding HTML Code Into Twextra <p> <object width="576" height="462"><param name="movie" value="http://www.youtube.com/v/YiSD10fuDvQ?fs=1&hl=en_US"></param> <param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param> <embed src="http://www.youtube.com/v/YiSD10fuDvQ?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="576" height="462"></embed></object> </p> </li> </ol> '; $message .= "<br style='clear:both;' />"; $message .= "</div>\n"; //p5_main $message .= $footer; $message .= "</div>\n"; //page $message .= "</div>\n"; //wrapper $message .= $godaddy_analytics; $message .= "</body>\n</html>\n"; echo $message; }
<?php require_once 'authenticate.php'; $PAGE_HEADER_HTML = header_html(); $PAGE_CSS_IMPORTS_HTML = css_imports_html(); function header_html() { $html = "<div id='page_box'>\n"; $html .= "<div id='header'>\n"; $html .= "<h2>Haze Watch</h2>"; $html .= "<div id='menu'>"; $html .= "<div class='nav_menu'>\n"; $html .= "<ul>"; $html .= "<li><a href='/'>Home</a></li>"; $html .= "<li><a href='/about.php'>About</a></li>"; $html .= "<li><a href='/contact.php'>Contact</a></li>"; $html .= "<li><a href='/publications.php'>Publications</a></li>"; if (user_authenticated()) { $html .= "<li><a href='/import-data.php'>Import</a></li>"; } $html .= "<li><a target='_blank' href='/map.php'>Map</a></li>"; $html .= "<li><a target='_blank' href='/cgi-bin/carbonmap.py'> Estimates</a></li>"; $html .= "</ul>"; $html .= "</div>\n"; $html .= "<div id='login_menu'>"; if (user_authenticated()) { $name = authenicated_username(); $name = $name ? " as {$name}" : ""; $html .= "Logged in{$name}, <a href='/authenticate.php?logout'>Logout</a>"; } else { $html .= "<a href='/login.php'>Login</a>";
$groupcn_dirty = empty($_GET['groupcn']) ? "" : $_GET['groupcn']; $action_dirty = $_GET['action']; $verbose_dirty = empty($_GET['verbose']) ? 0 : $_GET['verbose']; $all_dirty = empty($_GET['all']) ? 0 : $_GET['all']; include ("../lcs/includes/htmlpurifier/library/HTMLPurifier.auto.php"); $config = HTMLPurifier_Config::createDefault(); $purifier = new HTMLPurifier($config); //purification des variables $uid_dirty=$purifier->purify($uid); $groupcn_dirty=$purifier->purify($groupcn); $action_dirty=$purifier->purify($action); $verbose_dirty=$purifier->purify($verbose); $all_dirty=$purifier->purify($all); header_html("Gestion de l'authentification déportée"); $isadmin = is_admin("Annu_is_admin", $login); if ($isadmin != "Y") { echo "<div class='error_msg'>Cette fonctionnalité, nécessite les droits d'administrateur de l'annuaire du serveur LCS !</div>"; include ("../lcs/includes/pieds_de_page.inc.php"); exit; } $ds = ldap_connect($ldap_server, $ldap_port); if (! $ds) { echo "<div class='error_msg'>Erreur de connection à l'annuaire, veuillez contacter <A HREF='mailto:$MelAdminLCS?subject=PB connection a l'annuaire'>l'administrateur du système</A>.</div>\n"; include ("../lcs/includes/pieds_de_page.inc.php"); exit; }
function index($tweet = '', $error = '', $message_id = '') { if (session_id() == "") { session_start(); } logger($script_path . " index start:"); //configuration parameters: $config_params = Config::getConfigParams(); $hostname = $config_params['hostname']; $watch_demo = $config_params['watch_demo']; $docroot = $config_params['docroot']; $debug = $config_params['debug']; $enable_stats = $config_params['enable_stats']; $header = header_html(); // $footer = $config_params['footer']; $doctype = $config_params['doctype']; $html_attribute = $config_params['html_attribute']; $css = $config_params['css']; $google_analytics = $config_params['google_analytics']; $godaddy_analytics = $config_params['godaddy_analytics']; $cookie_name = $config_params['cookie_name']; $ep4 = $config_params['ep4']; $show_maintenance_page = $config_params['show_maintenance_page']; $fb_app_id = $config_params['fb_app_id']; $search_count_offset = $config_params['search_count_offset']; if ($show_maintenance_page == 1) { maintenance_page(); } if (isset($_REQUEST['screen_name_reply'])) { $screen_name_reply = $_REQUEST['screen_name_reply']; } else { $screen_name_reply = ''; } if (isset($_REQUEST['message_id_reply'])) { $message_id_reply = $_REQUEST['message_id_reply']; } else { $message_id_reply = ''; } logger($script_path . " index page: "); logger($script_path . " cookie:", $_COOKIE); //--------------------------------------------------- $model = new TwextraModel(); $message_totals = $model->get_message_totals(); //round to nearest thousand: $message_totals = $message_totals - $message_totals % 1000; //$message_totals = $message_totals - $search_count_offset; $message_totals = number_format($message_totals); //format into human readable form //--------------------------------------------------- //get twitter credentials and store in session variables for use in banner if (isset($_COOKIE[$cookie_name])) { $controller = new TwextraController(); $result_t = $controller->getTwCredentials($_COOKIE[$cookie_name]); // $screen_name = $result_t['screen_name']; logger($script_path . " result_t:", $result_t); } $script_path = __FUNCTION__; logger($script_path . " session: ", $_SESSION); logger($script_path . " request: ", $_REQUEST); //save logs if ($enable_stats) { $model = new TwextraModel(); $model->saveStat(); } //set error flag if a twitter error, or any other error if (isset($_REQUEST['error']) && $_REQUEST['error'] == 'twitter_error') { $error = "Twitter is returning an error right now. Please try again later. \n\t\tFollow <a href='http://twitter.com/twextradotcom' target='_blank' >@twextradotcom</a> for updates."; } else { if (isset($_REQUEST['error']) && $_REQUEST['error'] == 'ep4') { $error = $ep4; } else { if (isset($_REQUEST['error'])) { $error = urldecode($_REQUEST['error']); } else { if (isset($_REQUEST['signout'])) { $error = "You are now signed out of Twextra, but you may still be signed in on Twitter. " . $error; $_SESSION['user'] = ''; } else { if (isset($_SESSION['error_size'])) { $error = $_SESSION['error_size']; unset($_SESSION['error_size']); } } } } } if (isset($_SESSION['tweet'])) { $tweet = $_SESSION['tweet']; unset($_SESSION['tweet']); } if (!empty($screen_name)) { $twitter_checked = 'checked'; $twextra_checked = ''; } else { if (!empty($screen_name_reply)) { $twitter_checked = 'checked'; $twextra_checked = ''; } else { $twitter_checked = ''; $twextra_checked = 'checked'; } } if (!empty($message_id)) { $model = new TwextraModel(); $result = $model->readTweet($message_id, false); // $tweet = $result['tweet']; } else { if ($screen_name_reply != '') { $tweet = '@' . $screen_name_reply . ' '; } } $docroot = $_SERVER['DOCUMENT_ROOT']; $useragent = $_SERVER['HTTP_USER_AGENT']; $useragent = strtolower($useragent); $useragent = " " . $useragent; //so that strpos works fine.. // $blackberry = preg_match ( "/blackberry/i", $useragent ); // $iphone = preg_match ( "/iphone/i", $useragent ); $blackberry = strpos($useragent, "blackberry"); $iphone = strpos($useragent, "iphone"); $symbian = strpos($useragent, "symbian"); $android = strpos($useragent, "android"); $nokia = strpos($useragent, "nokia"); $samsung = strpos($useragent, "samsung"); $sony = strpos($useragent, "sony"); $vodafone = strpos($useragent, "vodafone"); $nintendo = strpos($useragent, "nintendo"); $sprint = strpos($useragent, "sprint"); $playstation = strpos($useragent, "playstation"); $mot = strpos($useragent, "mot"); $docomo = strpos($useragent, "docomo"); $palm = strpos($useragent, "palm"); $avantgo = strpos($useragent, "avantgo"); if ($blackberry || $iphone || $symbian || $android || $nokia || $samsung || $sony || $vodafone || $nintendo || $sprint || $playstation || $mot || $docomo || $palm || $avantgo) { $editor = 'editorI'; $_SESSION['useragent'] = 'device'; } else { $editor = 'editor'; $_SESSION['useragent'] = 'desktop'; } header("Pragma: no-cache"); header("cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past print $doctype; print "<html {$html_attribute} >"; echo header_html(); $body_top = "<body>\n<div class='wrapper'>\n<div class='page'>"; echo $body_top; if (!empty($error)) { $screen_name = ''; $twitter_checked = ''; $twextra_checked = 'checked'; } $banner = banner($screen_name, 'banner_index'); //(user, banner_class) echo $banner; logger("index/hostname:", $hostname); $message = ''; ?> <div class='p1main'> <div class='p1main_inner'> <div class='p1desc'> <?php //print any error messages here: if (!empty($error)) { ?> <div class='p1main_form_label' id='p1main_form_label' style='border: solid 2px red; padding: 10px; background-color: pink; width: 744px; margin: 10px 0;'> <?php echo $error; ?> <a href='javascript: hide_message_status("p1main_form_label")' style='float: right; font-size: 0.8em;'>Close</a></div> <?php } ?> <div style='float: left; width: 768px; padding-bottom: 10px;'> <h4 class='p1main_form_label'>Type your message below: </h4> <div style='font-size: 11px; float: left;'>(<a href=<?php echo $hostname . '/howto.php'; ?> >Tips for Videos, Images, etc</a>)</div> <br style='clear: both' /> </div> <?php $bookmarklet = "\n<div class='bookmarklet_outer' style='width: 300px;line-height: 150%;'>\n <div>\n <a class='bookmarklet_inner' href=\"javascript:(function(){_twextra_bookmarklet=document.createElement('SCRIPT');\n _twextra_bookmarklet.type='text/javascript';_twextra_bookmarklet.src='http://twetest.com/scripts/twextra_bookmarklet.js?\n x='+(Math.random());document.getElementsByTagName('head')[0].appendChild(_twextra_bookmarklet);})();\">\n Twextra Bookmarklet</a>\n </div>\n</div>"; //echo $bookmarklet; ?> <?php //form and editor; ?> <form method='post' action='/router.php' id='tweet_post' accept-charset="utf-8" class='p1form'><textarea class='ckeditor' id="<?php echo $editor; ?> " name="<?php echo $editor; ?> " rows="15" cols="100" style="width: 768px"><?php echo $tweet; ?> </textarea> <script type="text/javascript"> CKEDITOR.replace( 'editor' ); </script> <input type='hidden' name='route' value='tweet_post'></input> <input type='hidden' name='message_id_reply' value="<?php echo $message_id_reply; ?> "></input> <input type='hidden' name='message_id' value="<?php echo $message_id; ?> "></input> <div class='p1form_buttons'><input type="submit" name="save" id="save" value="Post Message" class='button'></input></div><?php //p1form_buttons; ?> <?php //show buttons: ?> <div class='p1form_social_buttons'> <div style='font-size: 18px; border-bottom: 1px solid black; margin-bottom: 10px;'>Post message to:</div> <div style='margin-top: 5px;'><input type="radio" name="social" value="twitter" <?php echo $twitter_checked; ?> style="margin-left: 0px; float: left; margin-top: 5px; margin-right: 10px;"></input> <img src="/images/twitter_100px.png" /></div> <div style='margin-top: 5px; margin-bottom: 5px;'><input type="radio" name="social" value="linkedin" style="margin-left: 0px; float: left; margin-top: 7px; margin-right: 10px;"></input> <img src="/images/linkedin_100px.png" /></div> <div style='margin-top: 5px; margin-bottom: 5px;'><input type="radio" name="social" value="twextra" <?php echo $twextra_checked; ?> style="margin-left: 0px; float: left; margin-top: 7px; margin-right: 10px;"></input> <img src="/images/twextra_100px.png" /></div> </div> </form> <br style='clear: both;' /> <?php $message .= "<div class='p1_buttons' >"; //tweet button $message .= "<div class='p1_twitter_button' style='float:right;' >"; //p1_twitter_button $message .= '<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" >Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>'; $message .= "</div>"; //p1_twitter_button //facebook like button $message .= "<div class='p1_facebook_button' style='float:right;' >"; //p1_facebook_button $message .= "\n<fb:like href=\"http://twextra.com\" layout=\"button_count\" show_faces=\"false\" width=\"100px\"></fb:like>\n\n <div id=\"fb-root\"></div>\n <script>\n window.fbAsyncInit = function() {\n FB.init({appId: '{$fb_app_id}', status: true, cookie: true, \n xfbml: true});\n };\n (function() {\n var e = document.createElement('script');\n e.type = 'text/javascript';\n e.src = document.location.protocol +\n '//connect.facebook.net/en_US/all.js';\n e.async = true;\n document.getElementById('fb-root').appendChild(e);\n }());\n </script>\n\t\t"; $message .= "</div>"; //p1_facebook_button //$message .= "<br style='clear:both;' />"; $message .= "</div>"; //p1_buttons $message .= " <h4 style='text-align:center'>Over {$message_totals} messages created</h4>"; echo $message; ?> </div> </div> </div> <!-- p1main --> <a style='margin: 20px auto 20px auto; display: block; text-align: center;' href='http://twitter.com/melaniejane88'> <img src='/images/twex.jpg' style='width: 600px; height: 100px' /></a> <?php echo $footer; ?> </div> </div> <?php echo $godaddy_analytics; ?> </body> </html> <?php }
break; case "Etape_2": // mysql settings ok, go test mysql settings and select database. header_html($LANG['install'][77] . " 2"); step3($_POST["db_host"], $_POST["db_user"], $_POST["db_pass"], $_POST["update"]); break; case "Etape_3": // Create and fill database header_html($LANG['install'][77] . " 3"); if (empty($_POST["databasename"])) { $_POST["databasename"] = ""; } if (empty($_POST["newdatabasename"])) { $_POST["newdatabasename"] = ""; } step4($_POST["db_host"], $_POST["db_user"], $_POST["db_pass"], $_POST["databasename"], $_POST["newdatabasename"]); break; case "Etape_4": // finish installation header_html($LANG['install'][77] . " 4"); step7(); break; case "update_1": if (empty($_POST["databasename"])) { $_POST["databasename"] = ""; } update1($_POST["db_host"], $_POST["db_user"], $_POST["db_pass"], $_POST["databasename"]); break; } } footer_html();
function notes_display() { if (session_id() == "") { session_start(); } logger($script_path . " index start:"); validate_access_webnotes(); //configuration parameters: $config_params = Config::getConfigParams(); $hostname = $config_params['hostname']; $watch_demo = $config_params['watch_demo']; $docroot = $config_params['docroot']; $debug = $config_params['debug']; $header = header_html(); // $footer = $config_params['footer']; $doctype = $config_params['doctype']; $html_attribute = $config_params['html_attribute']; $css = $config_params['css']; $google_analytics = $config_params['google_analytics']; $godaddy_analytics = $config_params['godaddy_analytics']; $cookie_name = $config_params['cookie_name']; $ep4 = $config_params['ep4']; $docroot = $_SERVER['DOCUMENT_ROOT']; $user = $_SESSION['user']; //?? $user = '******'; if ($_REQUEST['action'] == 'searchdisplay') { $tag = $_REQUEST['tag']; $model = new TwextraModel(); $notes_all_array = $model->searchNote($user, $tag); } else { $model = new TwextraModel(); $notes_all_array = $model->getNotesAll($user); } header("Pragma: no-cache"); header("cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past print $doctype; print "<html {$html_attribute} >"; $message = "\n\n<head>\n\n<link rel=\"stylesheet\" type=\"text/css\" href=\"{$css}\" />\n\n<title>Twextra- When you NEED more than 140 characters</title>"; echo $message; $scripts = ''; $scripts .= "<script type='text/javascript' src='/scripts/jquery/jquery-1.2.6.js'></script>\n"; echo $scripts; $message = "\n\n<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/favicon.ico\" />\n\n</head>\n\n<body>\n\n<div class='wrapper'>\n\n<div class='page'>"; echo $message; $banner = banner($screen_name, 'banner_index'); //(user, banner_class) echo $banner; $message = "<div style='clear:both;margin-left:auto;margin-right:auto;width:800px;'>\n\nYour webnotes are displayed below:"; $message .= "<table class='w_display_table' >"; $message .= "<tr class='w_display_tr' >\n\n<th class='w_display_th'>Note</th>\n\n<th class='w_display_th'>Tags</th>\n\n<th class='w_display_th'>Updated</th>\n\n<th class='w_display_th'>Actions</th></tr>"; foreach ($notes_all_array as $entry) { $message .= "<tr class='w_display_tr' >\n\n <td class='w_display_td'>{$entry['note']}</td>\n\n <td class='w_display_td' >{$entry['tag']}</td>\n\n <td class='w_display_td'>{$entry['created']}</td>\n\n <td class='w_display_td'><a href={$hostname}/webnotes/wrouter.php?wid={$entry['wid']}&wroute=edit >Edit</a>\n\n <span id='delete' style='color:blue;' onclick=_edit('{$hostname}',{$entry['wid']})>Delete</span>\n\n <a href={$hostname}/webnotes/wrouter.php?wid={$entry['wid']}&wroute=share>Share</a>\n\n </td></tr>"; } $message .= "</table>"; $message .= "</div>"; echo $message; echo $footer; $message = "\n\n</div>\n\n</div>\n\n</body>\n\n</html>"; echo $message; }
public static function generate() { return header_html() . bal('head', self::get()); }
function display_faqs($screen_name = '') { //configuration parameters: $config_params = Config::getConfigParams(); $css = $config_params['css']; $tweet_size_max = $config_params['tweet_size_max']; $tweet_size_max_google = $config_params['tweet_size_max_google']; $hostname = $config_params['hostname']; $doctype = $config_params['doctype']; $html_attribute = $config_params['html_attribute']; $banner = banner('', 'banner'); //(user, banner_class) $footer = $config_params['footer']; // $docroot = $config_params['docroot']; $godaddy_analytics = $config_params['godaddy_analytics']; $debug = $config_params['debug']; $enable_stats = $config_params['enable_stats']; $script_path = __FUNCTION__; //save logs if ($enable_stats) { $model = new TwextraModel(); // $model->saveStat(); } $header = header_html($prefix); // //.......................................................... header("Pragma: no-cache"); header("cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past $message = ''; $message .= $doctype; $message .= "<html {$html_attribute} >\n"; $message .= $header; $message .= "<body>\n"; $message .= "<div class='p5_wrapper'>\n"; $message .= "<div class='p5_page'>\n"; $message .= $banner; $message .= "<div style='margin-left:auto;margin-right:auto;margin-bottom:20px;width:768px;font-size:0.8em;' >\n"; //p5_main $message .= "<h3>Frequently Asked Questions</h3>"; $message .= "\n<ol style='clear:both' >\n<li> Are mobile devices supported?\n<p>Yes, most mobile devices are supported including iPhone, Blackberry etc.\nIf your mobile device is not supported, send us an email at contact@twextra.com.\n<p>\n\n<li>Is rich text supported on mobile devices?</li>\n<p>\nRich text is only supported on desktop/laptop computers, or through\nour API.\n</p>\n<li>Is cookie support required in the browser?</li>\n<p>Yes, our application requires that the cookies be enabled in the browser.\n</p>"; //<li>Why does the language translation not work?</li> //<p>You must enable UTF-8 (Unicode) encoding in your browser to use the language translation feature. //</p> $message .= "\n<li>Can I post messages in languages other than English?</li>\n<p> Yes, you can, provided you have enabled UTF-8 support in your browser.\n</p>\n\n</ol>\n\n"; $message .= "<br style='clear:both;' />"; $message .= "</div>\n"; //p5_main $message .= $footer; $message .= "</div>\n"; //page $message .= "</div>\n"; //wrapper $message .= $godaddy_analytics; $message .= "</body>\n</html>\n"; echo $message; }
function create_display() { if (session_id() == "") { session_start(); } logger($script_path . " index start:"); validate_access_webnotes(); //configuration parameters: $config_params = Config::getConfigParams(); $hostname = $config_params['hostname']; $watch_demo = $config_params['watch_demo']; $docroot = $config_params['docroot']; $debug = $config_params['debug']; $header = header_html(); // $footer = $config_params['footer']; $doctype = $config_params['doctype']; $html_attribute = $config_params['html_attribute']; $css = $config_params['css']; $google_analytics = $config_params['google_analytics']; $godaddy_analytics = $config_params['godaddy_analytics']; $cookie_name = $config_params['cookie_name']; $ep4 = $config_params['ep4']; $screen_name = 'raj4126'; $docroot = $_SERVER['DOCUMENT_ROOT']; $note = ''; $tag = ''; $wid = -1; if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'edit') { $wid = $_REQUEST['wid']; $action = 'editsave'; $model = new TwextraModel(); $note_array = $model->getNote($wid); $note = $note_array['note']; $tag = $note_array['tag']; } else { $action = 'index'; $wid = -1; } //echo 'action: ', $action; exit; //echo "user:note:tag:action:wid::<br>$user:$note:$tag:$action:$wid"; exit; //echo 'test2'; exit; header("Pragma: no-cache"); header("cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past print $doctype; print "<html {$html_attribute} >"; $message = "\n\n<head>\n\n<link rel=\"stylesheet\" type=\"text/css\" href=\"{$css}\" />\n\n<title>Twextra- When you NEED more than 140 characters</title>"; echo $message; $scripts = ''; $scripts .= "<script type='text/javascript' src='/scripts/jquery/jquery-1.2.6.js'></script>\n"; echo $scripts; $message = "\n\n<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/favicon.ico\" />\n\n</head>\n\n<body>\n\n<div class='wrapper'>\n\n<div class='page'>"; echo $message; $banner = banner($screen_name, 'banner_index'); //(user, banner_class) echo $banner; $message = "<div style='clear:both;margin-left:auto;margin-right:auto;width:800px;'>\n\n<form method='post' action='/webnotes/wrouter.php' accept-charset=\"utf-8\" >\n\n<input type='hidden' name='wroute' id='wroute' value='{$action}'> </input>\n\n<input type='hidden' name='wid' id='wid' value='{$wid}'> </input>\n\n\n\nWeb note: \n\n<textarea id='weditor' name='weditor' rows='15' cols='100' style='width: 768px; border:solid black 1px;'>\n\n{$note}\n\n</textarea> \n\nTags: <input type='text' name='tag' id='tag' size='100' style='border:solid black 1px;' value='{$tag}'></input>\n\n<div>\n\n<input type='submit' name='save' id='save' value='Post Message' class='button'></input>\n\n</div>\n\n\n\n</form>\n\n</div>"; echo $message; echo $footer; $message = "\n\n</div>\n\n</div>\n\n</body>\n\n</html>"; echo $message; }
checkConfigFile(); header_html(sprintf(__('Step %d'), 2)); step3($_POST["db_host"], $_POST["db_user"], $_POST["db_pass"], $_POST["update"]); break; case "Etape_3": // Create and fill database checkConfigFile(); header_html(sprintf(__('Step %d'), 3)); if (empty($_POST["databasename"])) { $_POST["databasename"] = ""; } if (empty($_POST["newdatabasename"])) { $_POST["newdatabasename"] = ""; } step4($_POST["databasename"], $_POST["newdatabasename"]); break; case "Etape_4": // finish installation header_html(sprintf(__('Step %d'), 4)); step7(); break; case "update_1": checkConfigFile(); if (empty($_POST["databasename"])) { $_POST["databasename"] = ""; } update1($_POST["databasename"]); break; } } footer_html();
$mysqlHandle = mysql_pconnect($HOSTNAME, $USERNAME, $PASSWORD); echo "-->"; if ($mysqlHandle == false) { echo "<html>\n"; echo "<head>\n"; echo "<title>MySQL Web Interface</title>\n"; echo "</head>\n"; echo "<body>\n"; echo "<table width=100% height=100%><tr><td><center>\n"; echo "<h1>Wrong Password!</h1>\n"; echo "<a href='{$PHP_SELF}?action=logon'>Logon</a>\n"; echo "</center></td></tr></table>\n"; echo "</body>\n"; echo "</html>\n"; } else { header_html(); if ($action == "listDBs") { listDatabases(); } else { if ($action == "createDB") { createDatabase(); } else { if ($action == "dropDB") { dropDatabase(); } else { if ($action == "listTables") { listTables(); } else { if ($action == "createTable") { createTable(); } else {
function displayTranslatedTweet($src_lang, $src_lang_value = '', $tgt_lang, $tgt_lang_value = '', $message_id) { //configuration parameters: $config_params = Config::getConfigParams(); $css = $config_params['css']; $tweet_size_max_google = $config_params['tweet_size_max_google']; $hostname = $config_params['hostname']; $doctype = $config_params['doctype']; $html_attribute = $config_params['html_attribute']; //$header = $config_params['header'];// //$banner = $config_params['banner'];// $banner = banner('', 'banner'); //(user, banner_class) $footer = $config_params['footer']; // $docroot = $config_params['docroot']; $godaddy_analytics = $config_params['godaddy_analytics']; $show_maintenance_page = $config_params['show_maintenance_page']; if ($show_maintenance_page == 1) { maintenance_page(); } $url = $hostname . "tweet_display.php?message_id={$message_id}&mthd=displayTweet"; $url_rewrite = "{$hostname}/{$message_id}"; $src_lang_value = $this->language_list[$src_lang]; $tgt_lang_value = $this->language_list[$tgt_lang]; //get src_tweet from model; $model = new TwextraModel(); $result = $model->readTweet($message_id, false); $src_tweet = $result['tweet']; //embed @replies for all cases $pattern_to_embed = 'at_reply'; $embed = new EmbedInLink($src_tweet, $pattern_to_embed); $src_tweet = $embed->embedPattern(); //embed links for all cases (Twitter, LinkedIn, Twextra) $pattern_to_embed = 'link'; $embed = new EmbedInLink($src_tweet, $pattern_to_embed); $src_tweet = $embed->embedPattern(); $created = $result['created']; $controller = new TwextraController(); $prefix = $controller->getPrefix($src_tweet, $message_id); $header = header_html($prefix); // //get tgt_tweet from google service //CHECK MAX SIZE, AND FREQUENCY OF TRANSLATIONS.. if (trim($src_tweet) != '') { $tgt_tweet = $this->translate($src_lang, $tgt_lang, $src_tweet); $tweet_object = json_decode($tgt_tweet); if (isset($tweet_object->responseData->translatedText)) { $tgt_tweet = $tweet_object->responseData->translatedText; } else { $tgt_tweet = ''; } } else { $tgt_tweet = ''; $url = ''; } header("Pragma: no-cache"); header("cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past $message = ''; $message .= $doctype; $message .= "<html {$html_attribute} >\n"; $message .= $header; $message .= "<body>"; $message .= "<div class='p3_wrapper'>"; $message .= "<div class='page'>"; $message .= $banner; $message .= "<div class='p3main'>\n"; $message .= "<div class='p3main_inner'>\n"; $message .= "<div class='p3main_text'>\n"; $message .= "<div class='p3tweet_header'>\n"; $message .= "<div class='p3count'> Created: " . $created . " (Pacific Time)</div>\n"; $message .= "<div style='float:left;'>\n"; $message .= "<div class='p3tweet_url'>Message URL: </div>\n"; $message .= "<div class='p3url_outer'><a href='{$url_rewrite}'>" . $url_rewrite . "</a></div>\n"; $message .= "</div>\n"; $message .= "<br style='clear:both;' />\n"; $message .= "</div>\n"; $message .= "<div>"; $message .= "<div class='p3tweet_title'>Source language ({$src_lang_value}):</div>\n"; $message .= "<div style='float:right; text-align:center;padding-bottom:5px;'><a href='{$hostname}' >\n New</a> | <a href='{$hostname}/index.php?message_id={$message_id}'>Edit</a></div>"; $message .= "<br style='clear:both;' />"; $message .= "</div>"; $message .= "<div class='p3tweet'>{$src_tweet}</div>"; $message .= "<div class='p3tweet_title_tr'>Target language ({$tgt_lang_value}):</div>\n"; $message .= "<div class='p3tweet'>{$tgt_tweet}</div>"; $message .= "</div>\n"; //main_text $message .= "<div class='p3main_form'>\n"; $message .= "<div class='p3main_form_inner'>\n"; $message .= "<form method='post' action='{$hostname}/router.php' name='tweet_translate' >\n"; $message .= "<div class='p3main_trans'>\n"; $message .= "Translate again: \n"; $message .= "</div>\n"; $message .= "<div class='p3_src_tgt_tran'>"; $message .= "<div class='p3main_src' >Source Language: \n"; $message .= "<select name='src_lang'>\n"; $selected = ''; foreach ($this->language_list as $key => $val) { if ($src_lang == $key) { $selected = "selected='selected'"; } $option = "<option value='{$key}' {$selected} >{$val}</option>\n"; $message .= $option; $selected = ''; } $message .= "</select>\n"; $message .= "</div>\n"; $message .= "<div class='p3main_tgt' >Target Language: \n"; $message .= "<select name='tgt_lang'>\n"; foreach ($this->language_list as $key => $val) { $option = "<option value='{$key}'>{$val}</option>\n"; $message .= $option; } $message .= "</select>\n"; $message .= "<input type='hidden' name='route' value='tweet_translate' ></input>\n"; $message .= "<input type='hidden' name='url' value='{$url}' ></input>\n"; $message .= "<input type='hidden' name='message_id' value='{$message_id}' ></input>\n"; $message .= "</div>\n"; $message .= "<div class='p3sub'>\n"; $message .= "<input class='button_translate' type='submit' name='submit' value='Translate' />\n"; $message .= "</div>\n"; //p3sub $message .= "<br style='clear:both;' />"; $message .= "</div>"; //p3_src_tgt_tran $message .= "</form>\n"; $message .= "<br style='clear:both' />\n"; $message .= "</div>\n"; //p3main_form_inner $message .= "</div>\n"; //p3main_form $message .= "</div>\n"; //main_inner $message .= "</div>\n"; //main $message .= $footer; $message .= "</div>\n"; //page $message .= "</div>\n"; //wrapper $message .= $godaddy_analytics; $message .= "</body></html>\n"; echo $message; }
function display_api_support($screen_name = '', $data) { //configuration parameters: $config_params = Config::getConfigParams(); $css = $config_params['css']; $tweet_size_max = $config_params['tweet_size_max']; $tweet_size_max_google = $config_params['tweet_size_max_google']; $hostname = $config_params['hostname']; $doctype = $config_params['doctype']; $html_attribute = $config_params['html_attribute']; $banner = banner('', 'banner'); //(user, banner_class) $footer = $config_params['footer']; // $docroot = $config_params['docroot']; $godaddy_analytics = $config_params['godaddy_analytics']; $debug = $config_params['debug']; $enable_stats = $config_params['enable_stats']; $script_path = __FUNCTION__; $email = ''; $firstname = ''; $lastname = ''; $application = ''; $company = ''; $web_site = ''; $twextra_key = ''; $error = ''; $error_email = ''; $error_firstname = ''; $error_lastname = ''; $error_application = ''; $error_company = ''; $error_web_site = ''; //save logs if ($enable_stats) { $model = new TwextraModel(); // $model->saveStat(); } if ($screen_name == '' && $data['submit'] == 'Submit') { $error = "<h2 style='color: red' >In order to get Twextra key, please authenticate with Twitter by pressing \n \tthe 'Sign in with Twitter' button at the top right of this page. </h2>"; } if ($screen_name != '' && $data['submit'] == 'Submit') { //store user data->get twextra key -> display key -> suppress the form $email = $data['email']; $firstname = $data['firstname']; $lastname = $data['lastname']; $application = $data['application']; $company = $data['company']; $web_site = $data['web_site']; } if ($data['clear'] == 'Clear') { $email = $firstname = $lastname = $application = $company = $web_site = ''; } //validate user input if ($data['submit'] == 'Submit') { $email_pattern = "/^.+@.+\\..+/"; $email_validate = preg_match($email_pattern, $email); if (!$email_validate) { $error_email = 1; } if (empty($firstname)) { $error_firstname = 1; } if (empty($lastname)) { $error_lastname = 1; } if (empty($application)) { $error_application = 1; } if (empty($company)) { $error_company = 1; } if (empty($web_site)) { $error_web_site = 1; } } if ($error_email) { $api_email = 'api_error'; } else { $api_email = ''; } if ($error_firstname) { $api_firstname = 'api_error'; } else { $api_firstname = ''; } if ($error_lastname) { $api_lastname = 'api_error'; } else { $api_lastname = ''; } if ($error_application) { $api_application = 'api_error'; } else { $api_application = ''; } if ($error_company) { $api_company = 'api_error'; } else { $api_company = ''; } if ($error_web_site) { $api_web_site = 'api_error'; } else { $api_web_site = ''; } if (($api_email || $api_firstname || $api_lastname || $api_application || $api_company || $api_web_site) && empty($error)) { $error = "<span class='api_error'>Please fill in info for the fields marked in red.</span>"; } if (!$error_email && !empty($firstname) && !empty($lastname) && !empty($application) && !empty($company) && !empty($web_site) && $data['submit'] == 'Submit') { $model = new TwextraModel(); $twextra_key = $model->get_twextra_key($email, $firstname, $lastname, $application, $company, $web_site, $screen_name); $model->update_api_tables($email, $firstname, $lastname, $application, $company, $web_site, $screen_name, $twextra_key); mail('*****@*****.**', 'New Twextra Key generated', "A New Twextra Key has been generated."); } $header = header_html($prefix); // //.......................................................... header("Pragma: no-cache"); header("cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past $message = ''; $message .= $doctype; $message .= "<html {$html_attribute} >\n"; $message .= $header; $message .= "<body>\n"; $message .= "<div class='p5_wrapper'>\n"; $message .= "<div class='p5_page'>\n"; $message .= $banner; $message .= "<div style='margin-left:auto;margin-right:auto;margin-bottom:20px;width:768px;font-size:0.8em;' >\n"; //p5_main $message .= "<h3>API Support</h3>"; $message .= "API support is available for posting messages to Twitter using Twextra's RESTful API.\nPlease fill out the following form to get your Twextra key."; $message .= "<br /><br />"; if ($twextra_key != '') { //$email=$firstname=$lastname=$application=$company=''; } $message .= "<div>\n\t <form method='POST' action='api_support.php'>\n\t <p> \n\t <span class='{$api_email}'>Email:</span> <input type='text' name='email' value='{$email}' size='40' maxlength= '100' /></p>\n\t <p> <span class='{$api_firstname}'>First Name:</span> <input type='text' name='firstname' value = '{$firstname}' size='40' maxlength= '100' /></p>\n\t <p> <span class='{$api_lastname}'>Last Name:</span> <input type='text' name='lastname' value = '{$lastname}' size='40' maxlength= '100' /></p>\n\t <p> <span class='{$api_application}'>Application:</span> <input type='text' name='application' value = '{$application}' size='40' maxlength= '100' /></p>\n\t <p> <span class='{$api_company}'>Company:</span> <input type='text' name='company' value = '{$company}' size='40' maxlength= '100' /></p>\n\t <p> <span class='{$api_web_site}'>Web-Site:</span> <input type='text' name='web_site' value = '{$web_site}' size='40' maxlength= '100' /></p>\n\t <p>\n\t \n\t \n\t <input type='submit' name='submit' value='Submit' /> \n\t <input type='submit' name='clear' value='Clear' /></p> \n\t </form>\n\t \n\t</div>"; if ($error != '') { $message .= $error; } if ($twextra_key != '') { $message .= "<h2 style='color: blue' >Thank you for registering your application. Your Twextra Key is: {$twextra_key}</h2>"; } $message .= "<h3>Overview</h3> \n\nThe Twextra Twitter API lets you post large messages (upto 100,000 characters) to Twitter. It is used with normal HTTP POST \nrequests. The API uses Twitter's OAuth method to authenticate the identity of a Twitter user.</p>"; $message .= "<h3>Method: upload </h3>\n\n<h3>URL: http://twextra.com/router.php </h3>\n\n\n<h3 class='api_h3' >Fields</h3>\n<pre style='font-size:15px;'>\n route\n editor\n twextra_key\n twitter_user_id\n twitter_access_token\n twitter_access_token_secret\n social\n</pre>"; $message .= "<h3>Format: json</h3>"; $message .= '<h3>Sample json response</h3><pre style="font-size:12px;"> { "place":null, "in_reply_to_screen_name":null, "retweeted":false, "coordinates":null, "geo":null, "source":"http://twextra.com", "retweet_count":null, "favorited":false, "in_reply_to_status_id":null, "created_at":"Mon Oct 18 06:39:31 +0000 2010", "in_reply_to_user_id":null, "user":{ "listed_count":0, "verified":false, "description":null, "follow_request_sent":false, "profile_sidebar_fill_color":"DDEEF6", "time_zone":"Pacific Time (US & Canada)", "profile_sidebar_border_color":"C0DEED", "followers_count":0,"url":null, "show_all_inline_media":false, "notifications":false, "profile_use_background_image":true, "friends_count":4, "lang":"en", "statuses_count":871, "created_at":"Tue Aug 10 06:24:42 +0000 2010", "profile_background_color":"C0DEED", "profile_image_url":"http://s.twimg.com/a/1287010001/images/default_profile_5_normal.png", "location":null, "profile_background_image_url":"http://s.twimg.com/a/1287010001/images/themes/theme1/bg.png", "favourites_count":1,"protected":true,"contributors_enabled":false, "profile_text_color":"333333", "screen_name":"your screen name", "name":"your name", "following":false, "geo_enabled":false, "profile_background_tile":false, "id":nnnnnnnnn,"utc_offset":-28800, "profile_link_color":"0084B4" }, "contributors":null, "id":nnnnnnnnnnn, "truncated":false, "text":"your message prefix... http://twextra.com/5252h3", "success":"Your message was posted successfully." }</pre> '; $message .= '<h3>Sample curl command</h3><pre style="font-size:12px;"> curl http://twextra.com/router.php -X POST -d route="tweet_post" -d editor1="message to be posted" -d twextra_key="mmmmmmmm" -d twitter_user_id="nnnnnnnn" -d twitter_access_token="twitter access token value" -d twitter_access_token_secret="twitter access token secret value" -d social="twitter"</pre>'; $message .= "<br style='clear:both;' />"; $message .= "</div>\n"; //p5_main $message .= $footer; $message .= "</div>\n"; //page $message .= "</div>\n"; //wrapper $message .= $godaddy_analytics; $message .= "</body>\n</html>\n"; echo $message; }