</div> <!-- row:action:forms --> <div class="row"> <div class="span9 offset1"> <div id="widgets"> <?php $startId = NULL; $endId = NULL; $gNumRecords = sizeof($listDBRows); if ($gNumRecords > 0) { $startId = $listDBRows[0]["id"]; $endId = $listDBRows[$gNumRecords - 1]["id"]; foreach ($listDBRows as $listDBRow) { echo \com\indigloo\sc\html\Lists::getWidget($listDBRow); } } else { $message = "No Lists found "; $options = array("hkey" => "dashboard.list.index"); echo \com\indigloo\sc\html\Site::getNoResult($message, $options); } ?> </div> <!-- widgets --> </div> </div> </div> <!-- container --> <?php $paginator->render($baseURI, $startId, $endId, $gNumRecords);
<?php include APP_WEB_DIR . '/inc/toolbar.inc'; ?> <div class="container mh600"> <?php include APP_WEB_DIR . '/inc/top-unit.inc'; ?> <div class="row"> <?php echo \com\indigloo\sc\html\Site::formMessage(); ?> <div class="span12"> <?php if ($gpage == 1) { echo \com\indigloo\sc\html\Lists::getPubHeader($listDBRow, $userDBRow); } ?> </div> </div> <!-- page:header --> <div class="row"> <div class="span12"> <div id="tiles"> <?php $startId = NULL; $endId = NULL; $gNumRecords = sizeof($itemDBRows); if ($gNumRecords > 0) {
if ($flag == 1 && empty($listId)) { // create new list if (!Util::isAlphaNumeric($name)) { $error = "Bad name : only letters and numbers are allowed!"; throw new UIException(array($error)); } $listId = $listDao->create($loginId, $name, $itemId); $pListId = PseudoId::encode($listId); } else { // Add to existing list // this can also be defaults lists // so we should get listId from addItem call $listId = $listDao->addItem($loginId, $listId, $itemId); $pListId = PseudoId::encode($listId); } $listUrl = ListHtml::getPubLink($pListId); $message = sprintf("success! items added to list %s", $listUrl); $gWeb->store(Constants::FORM_MESSAGES, array($message)); header("Location: " . $qUrl); } catch (UIException $ex) { $gWeb->store(Constants::STICKY_MAP, $fvalues); $gWeb->store(Constants::FORM_ERRORS, $ex->getMessages()); header("Location: " . $qUrl); exit(1); } catch (DBException $ex) { Logger::getInstance()->error($ex->getMessage()); Logger::getInstance()->backtrace($ex->getTrace()); $gWeb->store(Constants::STICKY_MAP, $fvalues); $message = "Error: something went wrong with database operation"; if ($ex->getCode() == 23000) { $message = sprintf("Error: list name _%s_ is already in use!", $name);
<?php // user/popup/list.php // normal HTML output // session pending action not possible. include 'sc-app.inc'; include APP_WEB_DIR . '/inc/header.inc'; use com\indigloo\Util; use com\indigloo\Url; use com\indigloo\sc\auth\Login; use com\indigloo\sc\ui\Constants as UIConstants; set_exception_handler('webgloo_ajax_exception_handler'); // list popup is called via javascript on pages // so actual "form caller " is what is coming in as // qUrl (original window.location.href) from javascript POST // this is base64 encoded $qUrl = Util::getArrayKey($_POST, "qUrl"); if (!Login::hasSession()) { $message = "You need to login!"; echo $message; exit; } $loginId = Login::getLoginIdInSession(); $itemId = Util::getArrayKey($_POST, "itemId"); $listDao = new \com\indigloo\sc\dao\Lists(); $listRows = $listDao->getOnLoginId($loginId); // Add default rows to top of lists // $html = \com\indigloo\sc\html\Lists::getSelectPopup($listRows, $itemId, $qUrl); echo $html;
$options = array("title" => "Likes", "tab" => "likes", "max" => 8, "size" => $gNumDBRows["likes"]); $likesHtml = UserHtml::getPubWrapper($pageBaseUrl, $count, $content, $options); $content = GraphHtml::getTable($loginId, $followers, 1, $followerUIOptions); $count = $ucounters["follower_count"]; $options = array("title" => "Followers", "tab" => "followers", "max" => 5, "size" => $gNumDBRows["followers"]); $followersHtml = UserHtml::getPubWrapper($pageBaseUrl, $count, $content, $options); $content = GraphHtml::getTable($loginId, $followings, 2, $followingUIOptions); $count = $ucounters["following_count"]; $options = array("title" => "Followings", "tab" => "followings", "max" => 5, "size" => $gNumDBRows["followings"]); $followingsHtml = UserHtml::getPubWrapper($pageBaseUrl, $count, $content, $options); $htmlActivityObj = new \com\indigloo\sc\html\Activity(); $activityHtml = $htmlActivityObj->getHtml($feedDataObj); //reset content $content = ""; foreach ($listDBRows as $listDBRow) { $content .= ListHtml::getPubWidget($listDBRow); } $count = $ucounters["list_count"]; $options = array("title" => "Lists", "tab" => "lists", "max" => 4, "size" => $gNumDBRows["lists"]); $listHtml = UserHtml::getPubWrapper($pageBaseUrl, $count, $content, $options); ?> <!DOCTYPE html> <html> <head> <title> <?php echo $pageTitle; ?> </title>