<?php $ci =& get_instance(); $user_id = $ci->session->userdata('user_id'); $foursquare_username = PluginStore::get("foursquare_username_{$user_id}", ""); $foursquare_password = PluginStore::get("foursquare_password_{$user_id}", ""); if (isset($_REQUEST['savebutton'])) { PluginStore::set("foursquare_username_{$user_id}", $_REQUEST['username']); PluginStore::set("foursquare_password_{$user_id}", $_REQUEST['password']); $foursquare_username = $_REQUEST['username']; $foursquare_password = $_REQUEST['password']; } ?> <div class="vbx-content-main"> <?php $store = PluginStore::getKeyValues(); ?> <div class="vbx-content-menu vbx-content-menu-top"> <h2 class="vbx-content-heading">FourSquare Account</h2> </div> <div class="vbx-content-container"> <div class="vbx-content-section"> <h3>Store Your Credentials</h3> <form action="" class="vbx-form"> <div class="vbx-input-container"> <label class="field-label">Username <input name="username" size="30" value="<?php echo $foursquare_username; ?>
<?php $ci =& get_instance(); $user_id = $ci->session->userdata('user_id'); $chirbit_username = PluginStore::get("chirbit_username_{$user_id}", ""); $chirbit_password = PluginStore::get("chirbit_password_{$user_id}", ""); if (isset($_REQUEST['savebutton'])) { PluginStore::set("chirbit_username_{$user_id}", $_REQUEST['username']); PluginStore::set("chirbit_password_{$user_id}", $_REQUEST['password']); $chirbit_username = $_REQUEST['username']; $chirbit_password = $_REQUEST['password']; $message = "Settings Saved!"; } ?> <div class="vbx-content-main"> <?php $store = PluginStore::getKeyValues(); ?> <div class="vbx-content-menu vbx-content-menu-top"> <h2 class="vbx-content-heading">Chirbit Credentials</h2> </div> <div class="vbx-content-container"> <div class="vbx-content-section"> <h3>Store Your Credentials</h3> <?php if (isset($message)) { ?> <h3><?php echo $message; ?>
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $sResponse = curl_exec($ch); $xml = new SimpleXMLElement($sResponse); if ($xml->Result[0] != null) { $lat = $xml->Result[0]->Latitude; $lon = $xml->Result[0]->Longitude; } } catch (Exception $e) { $err = $err . " {$e}"; } // Create an associative array of incoming call properties $callInfo = array(); $callInfo["city"] = $city; $callInfo["state"] = $state; $callInfo["caller"] = $caller; $callInfo["called"] = $called; $callInfo["sid"] = $CallGuid; $callInfo["lat"] = (string) $lat; $callInfo["lon"] = (string) $lon; $callInfo["time"] = time(); $callInfo["date"] = getdate(); $callInfo["err"] = $err; // append our array of call props to to a plugin-managed variable $intelCalls = PluginStore::get('IntelCalls', array()); // get our array of calls or default to new array if undefined array_push($intelCalls, $callInfo); PluginStore::set('IntelCalls', $intelCalls); // respond with nothing $response = new Response(); $response->addRedirect(AppletInstance::getDropZoneUrl('next')); $response->Respond();
/* Dashboard for vbx-intelligence display a list of calls poll the ajax file for new calls when a call is clicked, pass the call data to each widget and display */ include_once 'plugins/vbx-intelligence/applets/vbx-intelligence/widgets.php'; OpenVBX::addJS('pages/intel_js.php'); $intelCalls = (array) PluginStore::get('IntelCalls', array()); // hack to handle ajax requests if (!empty($_REQUEST['ajax'])) { include_once 'ajax.php'; exit; } if (!empty($_REQUEST['clearData'])) { $temp = PluginStore::set('IntelCalls', array()); //clear data echo "<script>document.location.href='vbx-intelligence-dashboard';</script>"; exit; } ?> <!-- maps library --> <script charset="UTF-8" type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2&mkt=en-us"></script> <div class="vbx-content-menu vbx-content-menu-top"> <h2 class="vbx-content-heading">VBX-Intelligence Dashboard</h2> <ul class="phone-numbers-menu vbx-menu-items-right"> </ul> </div> <div class="vbx-table-section"> <div style="padding:10px;">