Guest User

itemProperties.php

a guest
Jun 11th, 2012
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.44 KB | None | 0 0
  1. <?php require_once("../../../config.php");
  2.  
  3. //who's logged in
  4. $guid = "";
  5. if(isset($_SESSION[APP_LOGGEDIN_COOKIE_NAME])) $guid = fnFormInput($_SESSION[APP_LOGGEDIN_COOKIE_NAME]);
  6.  
  7. //init user object
  8. $thisUser = new User($guid);
  9. $thisUser -> fnLoggedInReq($guid);
  10. $thisUser -> fnUpdateLastRequest($guid);
  11.  
  12. //init page object
  13. $thisPage = new Page();
  14.  
  15. //include the js file to handle "save" clicks in advanced settings (ajax request)...
  16. $thisPage->jsRelativeInHead = "save.js";
  17.  
  18. //tell the "saveScreenData" js method in /cpv15.js what URL to use...
  19. $thisPage->jsInHead = "var ajaxURL = \"itemProperties_AJAX.php\";";
  20.  
  21. //add some inline css (in the <head>) for 100% width...
  22. $inlineCSS = "";
  23. $inlineCSS .= "html{height:100%;width:100%;margin:0px;padding:0px;} ";
  24. $inlineCSS .= "body{height:100%;width:100%;margin:0px;padding:0px;} ";
  25. $inlineCSS .= ".contentWrapper, .contentWrap{height:100%;width:100%;margin:0px;padding:0px;} ";
  26. $thisPage->cssInHead = $inlineCSS;
  27.  
  28.  
  29. $dtNow = fnMySqlNow();
  30. $strMessage = "";
  31. $bolDone = false;
  32. $bolPassed = true;
  33. $bolDeleted = false;
  34. $appGuid = fnGetReqVal("appGuid", "", $myRequestVars);
  35. $BT_parentScreenItemId = fnGetReqVal("BT_parentScreenItemId", "", $myRequestVars);
  36. $BT_childItemId = fnGetReqVal("BT_childItemId", "", $myRequestVars);
  37.  
  38. //need an appguid
  39. if($appGuid == "" || $BT_childItemId == ""){
  40. echo "invalid request";
  41. exit();
  42. }
  43.  
  44. //child item object..
  45. $objChildItem = new Bt_item($BT_childItemId);
  46. $jsonVars = $objChildItem->infoArray["jsonVars"];
  47.  
  48. //childItem properties...
  49. $titleText = "";
  50. $iconName = "";
  51. $iconURL ="";
  52. $descriptionText = "";
  53. $transitionType = "";
  54. $rowAccessoryType = "";
  55.  
  56. //fill vars from json
  57. if($jsonVars != ""){
  58. $json = new Json;
  59. $decoded = $json->unserialize($jsonVars);
  60. if(is_object($decoded)){
  61. if(array_key_exists("iconName", $decoded)) $iconName = $decoded->iconName;
  62. if(array_key_exists("iconURL", $decoded)) $iconURL = $decoded->iconURL;
  63.  
  64. if(array_key_exists("titleText", $decoded)) $titleText = $decoded->titleText;
  65. if(array_key_exists("descriptionText", $decoded)) $descriptionText = $decoded->descriptionText;
  66. if(array_key_exists("transitionType", $decoded)) $transitionType = $decoded->transitionType;
  67. if(array_key_exists("rowAccessoryType", $decoded)) $rowAccessoryType = $decoded->rowAccessoryType;
  68. }
  69. }
  70.  
  71.  
  72.  
  73. ?>
  74.  
  75. <?php echo $thisPage->fnGetPageHeaders(); ?>
  76. <?php echo $thisPage->fnGetBodyStart(); ?>
  77.  
  78. <input type="hidden" name="appGuid" id="appGuid" value="<?php echo $appGuid;?>">
  79. <input type="hidden" name="BT_parentScreenItemId" id="BT_parentScreenItemId" value="<?php echo $BT_parentScreenItemId;?>">
  80. <input type="hidden" name="BT_childItemId" id="BT_childItemId" value="<?php echo $BT_childItemId;?>">
  81.  
  82.  
  83. <div class='content'>
  84.  
  85. <fieldset class='colorLightBg minHeightShadowbox'>
  86.  
  87. <div class='contentBox colorDarkBg'>
  88.  
  89. <div class="contentBand colorBandBg">
  90. Menu Item Properties
  91. </div>
  92. <div style='padding:10px;'>
  93.  
  94. <table cellspacing='0' cellpadding='0'>
  95. <tr>
  96. <td style="padding:10px;padding-bottom:0px;">
  97.  
  98. <div style='padding-top:5px;'>
  99. <b>Icon URL</b>
  100. &nbsp;&nbsp;
  101. <img src="<?php echo APP_URL;?>/images/arr_right.gif" alt="arrow"/>
  102. <a href="<?php echo APP_URL;?>/bt_v15/bt_app/bt_pickerFile.php?appGuid=<?php echo $appGuid;?>&formEl=iconURL&fileNameOrURL=URL&searchFolder=/images" rel="shadowbox;height=750;width=950">Select</a>
  103. <br/>
  104. <input type='text' name="iconURL" id="iconURL" value="<?php echo fnFormOutput($iconURL);?>" /><br/>
  105. </div>
  106.  
  107. <div style='padding-top:5px;'>
  108. <b>Icon Name</b><br/>
  109. <input type='text' name="iconName" id="iconName" value="<?php echo fnFormOutput($iconName);?>" /><br/>
  110. </div>
  111.  
  112. <div style='padding-top:5px;'>
  113. <b>Row Title</b><br/>
  114. <input type='text' name="titleText" id="titleText" value="<?php echo fnFormOutput($titleText);?>" /><br/>
  115. </div>
  116. <div style='padding-top:5px;'>
  117. <b>Row Description</b><br/>
  118. <input type='text' name="descriptionText" id="titleText" value="<?php echo fnFormOutput($descriptionText);?>" /><br/>
  119. </div>
  120.  
  121. <div style='padding-top:5px;'>
  122. <b>Indicator Type</b><br/>
  123. <select name="rowAccessoryType" id="rowAccessoryType" style="width:250px;">
  124. <option value="" <?php echo fnGetSelectedString($rowAccessoryType, "slideDown");?>>Default Arrow</option>
  125. <option value="details" <?php echo fnGetSelectedString($rowAccessoryType, "slideDown");?>>Details Indicator</option>
  126. <option value="none" <?php echo fnGetSelectedString($rowAccessoryType, "slideDown");?>>None</option>
  127. </select>
  128. </div>
  129.  
  130. <div style='padding-top:5px;'>
  131. <b>Transition Type</b><br/>
  132. <select name="transitionType" id="transitionType" style="width:250px;">
  133. <option value="" <?php echo fnGetSelectedString($transitionType, "");?>>Default transition type</option>
  134. <option value="fade" <?php echo fnGetSelectedString($transitionType, "fade");?>>Fade</option>
  135. <option value="flip" <?php echo fnGetSelectedString($transitionType, "flip");?>>Flip</option>
  136. <option value="curl" <?php echo fnGetSelectedString($transitionType, "curl");?>>Curl</option>
  137. <option value="grow" <?php echo fnGetSelectedString($transitionType, "grow");?>>Grow</option>
  138. <option value="slideUp" <?php echo fnGetSelectedString($transitionType, "slideUp");?>>Slide Up</option>
  139. <option value="slideDown" <?php echo fnGetSelectedString($transitionType, "slideDown");?>>Slide Down</option>
  140. </select>
  141. </div>
  142.  
  143.  
  144. </td>
  145.  
  146. </tr>
  147. </table>
  148.  
  149.  
  150. <div style='padding:10px;'>
  151. <input type='button' title="save" value="save" align='absmiddle' class="buttonSubmit" onClick="saveScreenData('childItem');return false;">
  152. <div id="submit_childItem" class="submit_working" style='height:100px;'>&nbsp;</div>
  153. </div>
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161. </div>
  162. </div>
  163. </fieldset>
  164.  
  165. </div>
  166. <?php echo $thisPage->fnGetBodyEnd(); ?>
Advertisement
Add Comment
Please, Sign In to add comment