echo "<tr>"; echo "<td colspan='1' valign='top' width='30%' style='font-family:arial; font-size:12pt;color:black'>"; echo "Email[To|From]"; echo "</td>"; echo "<td colspan='1' valign='top' with='48%' style='font-family:arial; font-size:12pt;color:black'>"; echo "Subject"; echo "</td>"; echo "<td colspan='1' valign='top' width='25%' style='font-family:arial; font-size:12pt;color:black'>"; echo "Date"; echo "</td>"; echo "<td colspan='1' valign='top' width='3%'>"; echo " "; echo "</td>"; echo "</tr>"; for ($i = 0; $i <= 100; $i++) { $records = $cassandra->GetRecordByKey("cms", $i); if ($records['to'] == "{$search}" || $records['from'] == "{$search}" || $records['subject'] == "{$search}" || $records['content'] == "{$search}") { echo "<tr>"; echo "<td colspan='1' valign='top' width='30%' style='font-family:arial; font-size:10pt;color:#045FB4;'>"; if ($records['to'] == '') { echo "Empty]"; } else { echo "[" . $records['to']; } echo "|"; if ($records['from'] == '') { echo "Empty]"; } else { echo $records['from'] . "]"; } echo "</td>";
$GLOBALS['THRIFT_ROOT'] = 'C:/xampp/htdocs/cassandra'; // Load up all the thrift stuff require_once $GLOBALS['THRIFT_ROOT'] . '/class.php'; require_once $GLOBALS['THRIFT_ROOT'] . '/Thrift.php'; require_once $GLOBALS['THRIFT_ROOT'] . '/protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'] . '/transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'] . '/transport/TBufferedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'] . '/tmp.php'; // Initialize Cassandra $cassandra = new CassandraDB("ContentManagementSystem"); // Debug on $cassandra->SetDisplayErrors(true); $record = array("email" => "{$email}", "password" => "{$password}"); if ($cassandra->InsertRecordArray("users", "{$username}", $record)) { //get record $records = $cassandra->GetRecordByKey("users", "{$username}"); //email,pass and name $_SESSION['ema'] = $records['email']; //redirect after making sure that the user is registered and use sessions echo "<script language=\"javascript\" type=\"text/javascript\">"; echo "window.location=\"default.php\""; echo "</script>"; } } else { if ($acc == '' || $create == '' || $submitted == '') { echo "<tr>"; echo "<td colspan='2' valign='top' style='font-family:arial; font-size:14pt;color:#045FB4;'>"; echo "Please Login to access your Emails:"; echo "</td>"; echo "</tr>"; echo "<tr>";