Changeset 239
- Timestamp:
- 09/28/06 06:59:58 (7 years ago)
- Location:
- coldbox/trunk/src/system/dashboard
- Files:
-
- 27 added
- 2 removed
- 12 modified
-
config/config.xml.cfm (modified) (1 diff)
-
config/rollovers.xml (added)
-
config/settings.xml.cfm (modified) (2 diffs)
-
handlers/ehColdbox.cfc (modified) (8 diffs)
-
images/help_footer_bg.gif (added)
-
images/help_titlebar_bg.gif (added)
-
images/icons/cfcapi_icon.gif (added)
-
images/icons/developerresources_icon.gif (added)
-
images/icons/fileencoding_icon.gif (added)
-
images/icons/icon_guide_help.gif (added)
-
images/icons/icon_guide_tips.gif (added)
-
images/icons/logviewer_icon.gif (added)
-
images/icons/proxy_icon.gif (added)
-
images/icons/settings_27.gif (added)
-
images/icons/systeminfo_icon.gif (added)
-
images/th_bg.gif (added)
-
images/th_sorted_bg.gif (added)
-
includes/SchemaDocs (deleted)
-
includes/dashboard.js (modified) (4 diffs)
-
includes/style.css (modified) (8 diffs)
-
layouts/Layout.Login.cfm (modified) (1 diff)
-
layouts/Layout.Main.cfm (modified) (1 diff)
-
model/fwsettings.cfc (modified) (1 diff)
-
model/settings.cfc (modified) (8 diffs)
-
views/home (added)
-
views/home/vwCFCDocs.cfm (added)
-
views/home/vwOnlineResources.cfm (added)
-
views/home/vwSystemInfo.cfm (added)
-
views/settings (added)
-
views/settings/vwFileEncodingSettings.cfm (added)
-
views/settings/vwLogFileSettings.cfm (added)
-
views/settings/vwPassword.cfm (added)
-
views/settings/vwProxySettings.cfm (added)
-
views/settings/vwSettings.cfm (added)
-
views/tags/header.cfm (modified) (1 diff)
-
views/tags/rollovers.cfm (added)
-
views/tags/sidemenu_tools.cfm (added)
-
views/vwHome.cfm (modified) (1 diff)
-
views/vwLogin.cfm (modified) (1 diff)
-
views/vwSchemaDocs.cfm (deleted)
-
views/vwSettings.cfm (added)
Legend:
- Unmodified
- Added
- Removed
-
coldbox/trunk/src/system/dashboard/config/config.xml.cfm
r233 r239 31 31 <Setting name="Version" value="1.1.0"/> 32 32 <Setting name="TracSite" value="http://ortus.svnrepository.com/coldbox/" /> 33 <Setting name="OfficialSite" value="http://www.coldboxframework.com" /> 34 <Setting name="SchemaDocs" value="http://www.luismajano.com/projects/coldbox/documents/SchemaDocs/"/> 33 35 </YourSettings> 34 36 -
coldbox/trunk/src/system/dashboard/config/settings.xml.cfm
r226 r239 1 <?xml version="1.0" encoding="UTF-8"?> 1 2 <settings> 2 3 <password type="varchar">A4F973241182BD1D3BF8EF468162E7F36F5319FDDC33B574BABF380145FEF5347EACB4AAF2531CBD2CC4DE36ABCFF42E</password> … … 4 5 <!--Proxy Settings --> 5 6 <proxyflag type="Bit">false</proxyflag> 6 <proxyserver type="varchar" ></proxyserver>7 <proxyuser type="varchar" ></proxyuser>8 <proxypassword type="varchar" ></proxypassword>9 <proxyport type="varchar" ></proxyport>7 <proxyserver type="varchar"/> 8 <proxyuser type="varchar"/> 9 <proxypassword type="varchar"/> 10 <proxyport type="varchar"/> 10 11 11 12 </settings> -
coldbox/trunk/src/system/dashboard/handlers/ehColdbox.cfc
r235 r239 38 38 39 39 <!--- ************************************************************* ---> 40 <!--- LOGIN SECTION ---> 41 <!--- ************************************************************* ---> 40 42 41 43 <cffunction name="dspLogin" access="public" returntype="void"> … … 68 70 69 71 <!--- ************************************************************* ---> 72 <!--- FRAMESET SECTION ---> 73 <!--- ************************************************************* ---> 70 74 71 75 <cffunction name="dspFrameset" access="public" returntype="void"> … … 77 81 </cffunction> 78 82 79 <!--- ************************************************************* --->80 81 83 <cffunction name="dspHome" access="public" returntype="void"> 82 84 <!--- EXIT HANDLERS: ---> 83 <cfset rc.xeh Home = "ehColdbox.dspHome">85 <cfset rc.xehSystemInfo = "ehColdbox.dspSystemInfo"> 84 86 <cfset rc.xehResources = "ehColdbox.dspOnlineResources"> 85 87 <cfset rc.xehCFCDocs = "ehColdbox.dspCFCDocs"> 86 < cfset rc.xehSchemaDocs = "ehColdbox.dspSchemaDocs">87 88 <!--- Set the Rollovers ---> 89 <cfset rc.qRollovers = filterQuery(application.dbservice.get("settings").getRollovers(),"pagesection","home")> 88 90 <!--- Set the View ---> 89 91 <cfset setView("vwHome")> … … 102 104 103 105 <!--- ************************************************************* ---> 104 105 <cffunction name="dspSchemaDocs" access="public" returntype="void"> 106 <!--- Set the View ---> 107 <cfset setView("vwSchemaDocs")> 108 </cffunction> 109 110 <!--- ************************************************************* ---> 111 112 <cffunction name="dspPassword" access="public" returntype="void"> 113 <!--- Set the View ---> 114 <cfset setView("vwPassword")> 115 </cffunction> 106 <!--- HOME SECTION ---> 107 <!--- ************************************************************* ---> 108 109 <cffunction name="dspSystemInfo" access="public" returntype="void"> 110 <!--- Check if install folder exists ---> 111 <cfset rc.InstallFolderExits = directoryExists(ExpandPath("/coldbox/install"))> 112 <!--- Check if the samples folder exists ---> 113 <cfset rc.SampleFolderExists = directoryExists(ExpandPath("/coldbox/samples"))> 114 <!--- Set the View ---> 115 <cfset setView("home/vwSystemInfo")> 116 </cffunction> 117 118 <cffunction name="dspOnlineResources" access="public" returntype="void"> 119 <!--- Set the View ---> 120 <cfset setView("home/vwOnlineResources")> 121 </cffunction> 122 123 <cffunction name="dspCFCDocs" access="public" returntype="void"> 124 <!--- EXIT HANDLERS: ---> 125 <cfset rc.xehCFCDocs = "ehColdbox.dspCFCDocs"> 126 <cfset rc.cfcViewer = getPlugin("cfcViewer")> 127 <cfset paramValue("show", "")> 128 <cfif rc.show eq "plugins"> 129 <cfset rc.cfcViewer.setup("/coldbox/system/plugins","coldbox/system/plugins")> 130 <cfelseif rc.show eq "beans"> 131 <cfset rc.cfcViewer.setup("/coldbox/system/beans","coldbox/system/beans")> 132 <cfelseif rc.show eq "util"> 133 <cfset rc.cfcViewer.setup("/coldbox/system/util","coldbox/system/util")> 134 <cfelse> 135 <cfset rc.cfcViewer.setup("/coldbox/system/","coldbox/system/")> 136 </cfif> 137 <!--- Set the View ---> 138 <cfset setView("home/vwCFCDocs")> 139 </cffunction> 140 141 <!--- ************************************************************* ---> 142 <!--- SETTINGS SECTION ---> 143 <!--- ************************************************************* ---> 144 145 <cffunction name="dspSettings" access="public" returntype="void"> 146 <!--- EXIT HANDLERS: ---> 147 <cfset rc.xehSettings = "ehColdbox.dspGeneralSettings"> 148 <cfset rc.xehLogSettings = "ehColdbox.dspLogSettings"> 149 <cfset rc.xehEncodingSettings = "ehColdbox.dspEncodingSettings"> 150 <cfset rc.xehPassword = "ehColdbox.dspChangePassword"> 151 <cfset rc.xehProxy = "ehColdbox.dspProxySettings"> 152 <!--- Set the Rollovers For This Section ---> 153 <cfset rc.qRollovers = filterQuery(application.dbservice.get("settings").getRollovers(),"pagesection","settings")> 154 <!--- Set the View ---> 155 <cfset setView("vwSettings")> 156 </cffunction> 157 158 <cffunction name="dspGeneralSettings" access="public" returntype="void"> 159 <cfset rc.fwSettings = application.dbservice.get("fwsettings").getSettings()> 160 <!--- Set the View ---> 161 <cfset setView("settings/vwSettings")> 162 </cffunction> 163 164 <cffunction name="dspLogSettings" access="public" returntype="void"> 165 <cfset var fwSettings = application.dbservice.get("fwsettings").getSettings()> 166 <cfset rc.LogFileEncoding = fwSettings["LogFileEncoding"]> 167 <cfset rc.AvailableLogFileEncodings = fwSettings["AvailableLogFileEncodings"]> 168 <cfset rc.LogFileBufferSize = fwSettings["LogFileBufferSize"]> 169 <cfset rc.LogFileMaxSize = fwSettings["LogFileMaxSize"]> 170 <!--- EXIT HANDLERS: ---> 171 <cfset rc.xehDoSave = "ehColdbox.doSaveLogFileSettings"> 172 <!--- Set the View ---> 173 <cfset setView("settings/vwLogFileSettings")> 174 </cffunction> 175 176 <cffunction name="doSaveLogFileSettings" access="public" returntype="void"> 177 <cfset var fwSettings = application.dbservice.get("fwsettings").getSettings()> 178 <cfset var errors = false> 179 <!--- Validate blanks ---> 180 <cfif len(trim(rc.LogFileEncoding)) eq 0 or len(trim(rc.LogFileBufferSize)) eq 0 or len(trim(rc.LogFileMaxSize)) eq 0> 181 <cfset getPlugin("messagebox").setMessage("error","Please make sure you fill out all the values.")> 182 <cfset errors = true> 183 </cfif> 184 <!--- Validate Buffer ---> 185 <cfif not isNumeric(rc.LogFileBufferSize) or rc.LogFileBufferSize gt 64000 or rc.LogFileBufferSize lt 8000> 186 <cfset getPlugin("messagebox").setMessage("error","The Log File Buffer Size you sent in is not numeric or you choose a number not betwee 8000-64000 bytes. Please try again")> 187 <cfset errors = true> 188 </cfif> 189 <!--- ValidateMax Size ----> 190 <cfif not isNumeric(rc.LogFileMaxSize)> 191 <cfset getPlugin("messagebox").setMessage("error","The Log File Max Size you sent in is not numeric. Please try again")> 192 <cfset errors = true> 193 </cfif> 194 <!--- Check for Errors ---> 195 <cfif not errors> 196 <!--- Update the settings ---> 197 <cfset application.dbservice.get("fwsettings").saveLogFileSettings(rc.LogFileEncoding,rc.LogFileBufferSize,rc.LogFileMaxSize)> 198 <cfset getPlugin("messagebox").setMessage("info","Settings have been updated successfully. Please remember to reinitialize the framework on your applications for the changes to take effect.")> 199 <!--- Relocate ---> 200 <cfset setNextEvent("ehColdbox.dspLogSettings","fwreinit=1")> 201 <cfelse> 202 <!--- Relocate ---> 203 <cfset setNextEvent("ehColdbox.dspLogSettings")> 204 </cfif> 205 </cffunction> 206 207 <cffunction name="dspEncodingSettings" access="public" returntype="void"> 208 <cfset var fwSettings = application.dbservice.get("fwsettings").getSettings()> 209 <cfset rc.AvailableCFCharacterSets = fwSettings["AvailableCFCharacterSets"]> 210 <cfset rc.DefaultFileCharacterSet = fwSettings["DefaultFileCharacterSet"]> 211 <!--- EXIT HANDLERS: ---> 212 <cfset rc.xehDoSave = "ehColdbox.doSaveEncodingSettings"> 213 <!--- Set the View ---> 214 <cfset setView("settings/vwFileEncodingSettings")> 215 </cffunction> 216 217 <cffunction name="doSaveEncodingSettings" access="public" returntype="void"> 218 <cfset var fwSettings = application.dbservice.get("fwsettings").getSettings()> 219 <cfset var setCharacterSet = fwSettings["DefaultFileCharacterSet"]> 220 <!--- Check for changes ---> 221 <cfif comparenocase(setCharacterSet, rc.DefaultFileCharacterSet ) neq 0> 222 <!--- Update the settings ---> 223 <cfset application.dbservice.get("fwsettings").saveEncodingSettings(rc.DefaultFileCharacterSet)> 224 <cfset getPlugin("messagebox").setMessage("info","Settings have been updated successfully. Please remember to reinitialize the framework on your applications for the changes to take effect.")> 225 <!--- Relocate ---> 226 <cfset setNextEvent("ehColdbox.dspEncodingSettings","fwreinit=1")> 227 <cfelse> 228 <cfset getPlugin("messagebox").setMessage("warning","You did not select a new character set. No settings were saved.")> 229 <!--- Relocate ---> 230 <cfset setNextEvent("ehColdbox.dspEncodingSettings")> 231 </cfif> 232 </cffunction> 233 234 <cffunction name="dspChangePassword" access="public" returntype="void"> 235 <!--- EXIT HANDLERS: ---> 236 <cfset rc.xehDoSave = "ehColdbox.doChangePassword"> 237 <!--- Set the View ---> 238 <cfset setView("settings/vwPassword")> 239 </cffunction> 240 241 <cffunction name="doChangePassword" access="public" returntype="void"> 242 <cfset var errors = false> 243 <cfset var rtnStruct = ""> 244 <!--- Validate Passwords ---> 245 <cfif len(trim(rc.oldpassword)) eq 0 or len(trim(rc.newpassword)) eq 0 or len(trim(rc.newpassword2)) eq 0> 246 <cfset getPlugin("messagebox").setMessage("error", "Please fill out all the necessary fields.")> 247 <cfelse> 248 <!--- Save the new password ---> 249 <cfset rtnStruct = application.dbservice.get("settings").changePassword(rc.oldpassword,rc.newpassword,rc.newpassword2)> 250 <!--- Validate ---> 251 <cfif not rtnStruct.results> 252 <cfset getPlugin("messagebox").setMessage("error", "#rtnStruct.message#")> 253 <cfelse> 254 <cfset getPlugin("messagebox").setMessage("info", "Your new password has been updated successfully.")> 255 </cfif> 256 </cfif> 257 <!--- Move to new event ---> 258 <cfset setnextEvent("ehColdbox.dspChangePassword")> 259 </cffunction> 260 261 <cffunction name="dspProxySettings" access="public" returntype="void"> 262 <cfset var settings = application.dbservice.get("settings").getSettings()> 263 <cfset rc.proxyflag = settings["proxyflag"]> 264 <cfset rc.proxyserver = settings["proxyserver"]> 265 <cfset rc.proxyuser = settings["proxyuser"]> 266 <cfset rc.proxypassword = settings["proxypassword"]> 267 <cfset rc.proxyport = settings["proxyport"]> 268 <!--- EXIT HANDLERS: ---> 269 <cfset rc.xehDoSave = "ehColdbox.doChangeProxySettings"> 270 <!--- Set the View ---> 271 <cfset setView("settings/vwProxySettings")> 272 </cffunction> 273 274 <cffunction name="doChangeProxySettings" access="public" returntype="void"> 275 <cfset var errors = false> 276 <cfset var rtnStruct = ""> 277 <!--- Validate Passwords ---> 278 <cfif len(trim(rc.proxyport)) neq 0 and not isnumeric(rc.proxyport)> 279 <cfset getPlugin("messagebox").setMessage("error", "The proxy port you filled out was not numeric. Please try again.")> 280 <cfelse> 281 <!--- Save the proxy settings ---> 282 <cfset application.dbservice.get("settings").changeProxySettings(rc.proxyflag,rc.proxyserver,rc.proxyuser, rc.proxypassword, rc.proxyport)> 283 <cfset getPlugin("messagebox").setMessage("info", "Your proxy settings have been saved successfully.")> 284 </cfif> 285 <!--- Move to new event ---> 286 <cfset setnextEvent("ehColdbox.dspProxySettings")> 287 </cffunction> 288 289 <!--- ************************************************************* ---> 290 291 116 292 117 293 <!--- ************************************************************* ---> … … 151 327 </cfif> 152 328 <cfset setView("vwBackups")> 153 </cffunction>154 <!--- ************************************************************* --->155 156 <!--- ************************************************************* --->157 <cffunction name="dspModifyLog" access="public" returntype="void">158 <cfset var logText = "">159 <!--- Read Modify Log --->160 <cffile action="read" file="#getSetting("ModifyLogLocation",true)#" variable="logtext">161 <cfset logText = replace(logtext, chr(13), "<br>", "all")>162 <cfset logText = replace(logtext, chr(9), " ", "all")>163 <cfset setValue("logtext", logtext)>164 <!--- Test for CFDOC --->165 <cfif getValue("cfdoc", false) eq false >166 <cfset setView("vwModifyLog")>167 <cfelse>168 <cfset setValue("fpcontent", logtext)>169 <cfset setValue("usePreTag", false)>170 <cfset setView("vwFPViewer")>171 </cfif>172 </cffunction>173 <!--- ************************************************************* --->174 175 <!--- ************************************************************* --->176 <cffunction name="dspConfigHelp" access="public" returntype="void">177 <cfset setView("vwConfigHelp")>178 <!--- CFDoc Check --->179 <cfset cfdoc()>180 </cffunction>181 <!--- ************************************************************* --->182 183 <!--- ************************************************************* --->184 <cffunction name="dspHandlersHelp" access="public" returntype="void">185 <cfset setView("vwHandlersHelp")>186 <!--- CFDoc Check --->187 <cfset cfdoc()>188 </cffunction>189 <!--- ************************************************************* --->190 191 <!--- ************************************************************* --->192 <cffunction name="dspSettings" access="public" returntype="void">193 <cfset setView("vwSettings")>194 <!--- CFDoc Check --->195 <cfset cfdoc()>196 </cffunction>197 <!--- ************************************************************* --->198 199 <!--- ************************************************************* --->200 <cffunction name="dspAPI" access="public" returntype="void">201 <!--- Code to Parse to System Directory --->202 <cfset var script = getDirectoryFromPath(cgi.SCRIPT_NAME)>203 <cfset var itemcount = listlen(script,"/")>204 <cfset var SystemPath = replace( listDeleteAt(script,itemcount,"/") & "/","/","","one")>205 <cfset var PluginPath = SystemPath & "plugins/">206 <cfset var cfcPath = "">207 <cfset var dirPath = "">208 <cfset var oCFCViewer = "">209 210 <!--- Determine type of cfc's to show --->211 <cfif getValue("type","") eq "plugins">212 <cfset cfcPath = PluginPath>213 <cfset dirPath = "../plugins/">214 <cfelseif getValue("type","") eq "system">215 <cfset cfcPath = SystemPath>216 <cfset dirPath = "../">217 </cfif>218 <!---Set paths --->219 <cfset setValue("cfcPath", cfcPath)>220 <cfset setValue("dirPath", dirPath)>221 222 <!--- Get cfcviewer Plugin --->223 <cfset oCFCViewer = getPlugin("cfcViewer")>224 <cfset oCFCViewer.setup(dirPath, cfcPath)>225 226 <!--- Place in req Collection --->227 <cfset setValue("oCFCViewer",oCFCViewer)>228 <cfset setValue("aCFC",oCFCViewer.getCFCs())>229 230 <!--- set the view --->231 <cfset setView("vwAPI")>232 <!--- CFDoc Check --->233 <cfset cfdoc()>234 329 </cffunction> 235 330 <!--- ************************************************************* ---> … … 271 366 <!--- ************************************************************* ---> 272 367 273 274 275 <!--- ************************************************************* ---> 276 <cffunction name="doChangePassword" access="public" returntype="void"> 277 <cfset var errors = ""> 278 <!--- Validations ---> 279 <cfif trim(getValue("new_password")) eq "" or trim(getValue("current_password")) eq "" or trim(getValue("new_password2")) eq ""> 280 <cfset errors = "- Please enter all the fields.<br>"> 281 </cfif> 282 <!--- pass matches ---> 283 <cfif compare(trim(getValue("new_password")), trim(getValue("new_password2"))) neq 0> 284 <cfset errors = errors & "- The new password does not match the confirmation password. Try again.<br>"> 285 </cfif> 286 <!--- Test for old Password ---> 287 <cfif not getPlugin("settings").passwordCheck(trim(hash(getValue("current_password"))))> 288 <cfset errors = errors & "- The current password you entered is incorrect.<br>"> 289 </cfif> 290 <cfif len(errors) neq 0> 291 <cfset getPlugin("messagebox").setMessage("warning",errors)> 292 <cfset setNextEvent("ehColdbox.dspPassword")> 293 </cfif> 294 295 <!--- Change Password ---> 296 <cfset getPlugin("settings").changePassword(trim(getValue("current_password")),trim(getValue("new_password")))> 297 <cfset getPlugin("messagebox").setMessage("info","Your Dashboard password has been changed.")> 298 <cfset setNextEvent("ehColdbox.dspPassword")> 299 300 </cffunction> 301 <!--- ************************************************************* ---> 302 303 <!--- ************************************************************* ---> 368 <!--- ************************************************************* ---> 304 369 <cffunction name="doSaveConfig" access="public" returntype="void"> 305 370 <!--- Save Config XML ---> … … 503 568 <!--- ************************************************************* ---> 504 569 505 <!--- ************************************************************* ---> 506 <cffunction name="doChangeLocale" access="public" returntype="void"> 507 <!--- Change Locale ---> 508 <cfset getPlugin("i18n").setfwLocale(getValue("locale"))> 509 <cfset dspHome()> 510 </cffunction> 511 <!--- ************************************************************* ---> 512 570 513 571 <!--- ************************************************************* ---> 514 572 <!--- UTILITY METHODS ---> … … 527 585 <!--- ************************************************************* ---> 528 586 529 <!--- ************************************************************* ---> 530 <cffunction name="cfdoc" access="private" returntype="void" hint="Change the layout to cfdoc"> 531 <cfif getValue("cfdoctype","") neq ""> 532 <cfset setLayout("Layout.cfdoc")> 533 </cfif> 534 </cffunction> 535 <!--- ************************************************************* ---> 536 537 <!--- ************************************************************* ---> 538 <cffunction name="getPassword" access="private" hint="Gets the current dashboard password or creates one if necessary." returntype="any" output="false"> 539 <cfset var pass = "coldbox=9702D637FA3229EAFFC5A58FF7E06B6C"> 540 <cfset var passContent = ""> 541 <cfset var passfile = "#getSetting("FrameworkPath",1)##getSetting("OSFileSeparator",1)#admin#getSetting("OSFileSeparator",1)#config#getSetting("OSFileSeparator",1)#.coldbox"> 542 543 <!--- Check if file .coldbox exists ---> 544 <cfif fileExists( passfile )> 545 <cffile action="read" file="#passfile#" variable="passContent"> 546 <!--- Veriy pass on File is Correct. ---> 547 <cfif not refindNocase("^coldbox=.*", passContent)> 548 <cffile action="write" file="#passFile#" output="#pass#"> 549 <cfset passContent = pass> 550 </cfif> 551 <cfreturn getToken(passContent, 2,"=")> 552 <cfelse> 553 <!--- Create New File with Password ---> 554 <cffile action="write" file="#passfile#" output="#pass#"> 555 <cfset passContent = pass> 556 <!--- Return password hash---> 557 <cfreturn getToken(passContent, 2,"=")> 558 </cfif> 559 </cffunction> 560 <!--- ************************************************************* ---> 561 562 <!--- ************************************************************* ---> 563 <cffunction name="passwordCheck" access="public" hint="Checks wether the passed password is correct or not." returntype="boolean" output="false"> 564 <!--- ************************************************************* ---> 565 <cfargument name="passToCheck" required="yes" type="string" hint="The password to verify. Hashed already please."> 566 <!--- ************************************************************* ---> 567 <cfif Compare(trim("#getPassword()#"),trim(arguments.passToCheck)) eq 0> 568 <cfreturn true> 569 <cfelse> 570 <cfreturn false> 571 </cfif> 572 </cffunction> 573 <!--- ************************************************************* ---> 574 575 <!--- ************************************************************* ---> 576 <cffunction name="changePassword" access="public" hint="Changes the dashboard password." returntype="boolean" output="false"> 577 <!--- ************************************************************* ---> 578 <cfargument name="currentPassword" required="yes" type="string"> 579 <cfargument name="newPassword" required="yes" type="string"> 580 <!--- ************************************************************* ---> 581 <cfset var newPass = ""> 582 <cfset var passfile = "#getSetting("FrameworkPath",1)##getSetting("OSFileSeparator",1)#admin#getSetting("OSFileSeparator",1)#config#getSetting("OSFileSeparator",1)#.coldbox"> 583 <cfif CompareNocase(getSetting("AppName"),getSetting("DashboardName",1)) eq 0> 584 <cfif passwordCheck(hash(arguments.currentPassword))> 585 <!--- Create New File with Password ---> 586 <cfset newPass = "coldbox=#hash(arguments.newPassword)#"> 587 <cffile action="write" file="#passFile#" output="#newPass#"> 588 <cfreturn true> 589 <cfelse> 590 <cfreturn false> 591 </cfif> 592 <cfelse> 593 <cfreturn false> 594 </cfif> 595 </cffunction> 596 <!--- ************************************************************* ---> 587 597 588 </cfcomponent> -
coldbox/trunk/src/system/dashboard/includes/dashboard.js
r233 r239 7 7 //******************************************************************************** 8 8 function lon(){ 9 Effect.Appear('myloader',{duration: .2}); 9 try{ 10 Effect.Appear('myloader',{duration: .2}); 11 } 12 catch(err){null;} 10 13 } 11 14 function loff(){ 12 Effect.Fade('myloader',{duration: .2}); 15 try{ 16 Effect.Fade('myloader',{duration: .2}); 17 } 18 catch(err){null;} 13 19 } 14 20 … … 44 50 } 45 51 } 52 function helpon(){ 53 Effect.BlindDown('helpbox'); 54 } 55 function helpoff(){ 56 Effect.BlindUp('helpbox'); 57 } 46 58 //******************************************************************************** 47 59 //AJAX INTERACTION … … 59 71 60 72 function doEvent (e, targetID, params, methodType ) { 61 parent.topframe.lon(); 73 parent.topframe.lon(); 62 74 var pars = "event=" + e + "&"; 63 75 //Check for Method. … … 87 99 return false; 88 100 } 89 90 101 function framebuster(){ 102 if ( top != self ) 103 top.location=self.location; 104 } 105 function resetHint(){ 106 $("sidemenu_help").innerHTML = "Help tips will be shown here. Just rollover the links above and you will get help."; 107 } 108 function confirmit(){ 109 if ( confirm ("Do you want to commit these changes to the framework.") ) 110 return true; 111 else 112 return false; 113 } 91 114 92 115 //******************************************************************************** -
coldbox/trunk/src/system/dashboard/includes/style.css
r235 r239 5 5 padding: 0px; 6 6 font-family:Verdana, Arial, Helvetica, sans-serif; 7 font-size:1 1px;7 font-size:10px; 8 8 height: 100%; 9 9 } … … 19 19 font-weight:bold; 20 20 text-decoration:none; 21 font-style: italic; 22 font-size: 10px; 21 23 } 22 24 a:hover{ … … 36 38 border-top: 1px solid #AAAAAA; 37 39 border-bottom: 1px solid #dddddd; 38 font-size: 9px;40 font-size:10px; 39 41 } 40 42 .browserbuttonsbar{ … … 103 105 bottom: 0px; 104 106 } 105 .contentboxes_header{106 background: url(../images/contentboxes_header.png) repeat-x;107 height: 50px;108 clear: both;109 }110 .contentboxes{111 margin: 20px;112 clear: both;113 }114 107 .contentboxes_title{ 115 108 margin-left: 20px; … … 130 123 /* SIDE MENU */ 131 124 .sidemenu{ 132 position: absolute;125 /* position: absolute; 133 126 right: 0px; 134 top: 0px; 127 top: 0px;*/ 135 128 background: url(../images/sidemenu_bg.png) repeat; 136 129 height: 100%; … … 144 137 .sidemenu_help{ 145 138 font-size: 9px; 146 margin: 8px; 139 margin: 10px; 140 height: 30px; 147 141 } 148 142 .sidemenu_toolbar{ … … 180 174 } 181 175 /* CONTENT */ 182 .content{ 183 margin: 20px; 176 #content{ 177 width: 600px; 178 height: 100%; 179 text-align:left; 180 } 181 .maincontentbox{ 182 width: 600px; 183 border: 1px outset #cccccc; 184 background: url(../images/contentboxes_footer.png) repeat-x bottom; 185 margin: 15px; 186 } 187 .contentboxes_header{ 188 background: url(../images/contentboxes_header.png) repeat-x; 189 height: 50px; 190 } 191 .contentboxes{ 192 margin: 10px; 193 margin-bottom: 50px; 194 } 195 /* HELP DIVS */ 196 .helpbox{ 197 width: 350px; 198 height: 260px; 199 border: 1px solid #ddd; 200 background: url(../images/help_footer_bg.gif) #FBFFCD repeat-x bottom; 201 margin: 15px; 202 position: relative; 203 margin: auto; 204 } 205 .helpbox_header{ 206 width: 100%; 207 background: url(../images/help_titlebar_bg.gif) repeat-x; 208 height: 30px; 209 font-weight: bold; 210 } 211 .helpbox_header_title{ 212 padding-top:3px; 213 padding-left: 10px; 214 } 215 .helpbox_message{ 216 width: 330px; 217 height: 200px; 218 overflow: auto; 219 overflow-x: hidden; 220 margin-left: 10px; 221 margin-right: 10px; 222 margin-bottom: 10px; 223 } 224 .helpbox_message ul{ 225 list-style-image: url(../images/icons/icon_guide_tips.gif); 226 } 227 .helpbox_message li{ 228 margin-left: -15px; 229 margin-bottom: 10px; 230 vertical-align: text-top; 184 231 } 185 232 /* FORM ELEMENTS */ 233 .redtext{ 234 color: red; 235 } 236 .tablelisting{ 237 font-size: 9px; 238 border-bottom: 1px solid #cccccc; 239 } 240 .tablelisting tr:hover { background: #E8F2FE } 241 .tablelisting th { 242 text-align: left; 243 background-color: #F6F6F6; 244 background-image: url(../images/th_bg.gif); 245 background-repeat: repeat-x; 246 color: #000000; 247 border: 1px solid #7D7D7D; 248 } 249 .sort { 250 background-color: #5DE3FF; 251 background-image: url(../images/th_sorted_bg.gif); 252 background-repeat: repeat-x; 253 border-top: 1px solid #002F93; 254 border-bottom: 1px solid #0090FF; 255 color: #000000; 256 text-align: left; 257 font-weight: bold; 258 } 259 fieldset{ 260 background-color: #f5f5f5; 261 border: 1px solid #ddd; 262 } 186 263 input[type=button], input[type=submit], input[type=reset] { 187 264 background: #eee; … … 201 278 color: #999; 202 279 } 203 input[type=text], input[type=password], input[type=checkbox], textarea {border: 1px solid #d7d7d7 }204 input[type=text], input[type=password], input[type=checkbox] { padding: .20em .3em }205 input[type=text]:focus, input[type=password]:focus, textarea:focus, input[type=checkbox]:focus {280 input[type=text], input[type=password], input[type=checkbox], textarea, select { font-size:10px; border: 1px solid #d7d7d7 } 281 input[type=text], input[type=password], input[type=checkbox], select { padding: .20em .3em } 282 input[type=text]:focus, input[type=password]:focus, textarea:focus, input[type=checkbox]:focus, select:focus { 206 283 border: 1px solid #886; 207 284 } -
coldbox/trunk/src/system/dashboard/layouts/Layout.Login.cfm
r226 r239 10 10 </head> 11 11 12 <body >12 <body onload="framebuster()"> 13 13 14 14 <div class="headerbar"></div> -
coldbox/trunk/src/system/dashboard/layouts/Layout.Main.cfm
r235 r239 10 10 <script language="javascript" src="includes/toolkit/scriptaculous.js?load=effects"></script> 11 11 </head> 12 <body onunload="parent.topframe.lon()" onLoad="parent.topframe.loff()">12 <body> 13 13 <cfset WriteOutput(renderView())> 14 14 </body> -
coldbox/trunk/src/system/dashboard/model/fwsettings.cfc
r226 r239 1 1 <cfcomponent output="false" displayname="fwsettings" hint="I am the Dashboard Framework Settings model."> 2 3 <!------------------------------------------- CONSTRUCTOR -------------------------------------------> 2 4 3 5 <!--- Constructor ---> 4 6 <cfset variables.instance = structnew()> 7 <cfset variables.instance.settingsFilePath = ExpandPath("/coldbox/system/config/settings.xml")> 8 <cfset variables.instance.qSettings = queryNew("")> 9 <cfset variables.instance.xmlObj = ""> 5 10 6 11 <cffunction name="init" access="public" returntype="fwsettings" output="false"> 7 12 <cfset parseSettings()> 8 13 <cfreturn this> 9 14 </cffunction> 15 16 <!------------------------------------------- PUBLIC -------------------------------------------> 10 17 18 <cffunction name="getSettings" access="public" returntype="query" output="false"> 19 <cfreturn instance.qSettings> 20 </cffunction> 21 22 <cffunction name="saveLogFileSettings" access="public" returntype="void" output="false"> 23 <!--- ************************************************************* ---> 24 <cfargument name="LogFileEncoding" required="true" type="string"> 25 <cfargument name="LogFileBufferSize" required="true" type="string"> 26 <cfargument name="LogFileMaxSize" required="true" type="string"> 27 <!--- ************************************************************* ---> 28 <cfscript> 29 var x = 1; 30 var settingArray = instance.xmlObj.xmlRoot.settings.xmlChildren; 31 for (x=1; x lte ArrayLen(settingArray); x=x+1){ 32 if ( Comparenocase(settingArray[x].xmlAttributes.name,"LogFileEncoding") eq 0){ 33 settingArray[x].xmlAttributes.value = trim(arguments.logFileEncoding); 34 } 35 if ( Comparenocase(settingArray[x].xmlAttributes.name,"LogFileBufferSize") eq 0){ 36 settingArray[x].xmlAttributes.value = trim(arguments.LogFileBufferSize); 37 } 38 if ( Comparenocase(settingArray[x].xmlAttributes.name,"LogFileMaxSize") eq 0){ 39 settingArray[x].xmlAttributes.value = trim(arguments.LogFileMaxSize); 40 } 41 } 42 saveSettings(); 43 </cfscript> 44 </cffunction> 45 46 <cffunction name="saveEncodingSettings" access="public" returntype="void" output="false"> 47 <!--- ************************************************************* ---> 48 <cfargument name="DefaultFileCharacterSet" required="true" type="string"> 49 <!--- ************************************************************* ---> 50 <cfscript> 51 var x = 1; 52 var settingArray = instance.xmlObj.xmlRoot.settings.xmlChildren; 53 for (x=1; x lte ArrayLen(settingArray); x=x+1){ 54 if ( Comparenocase(settingArray[x].xmlAttributes.name,"DefaultFileCharacterSet") eq 0){ 55 settingArray[x].xmlAttributes.value = trim(arguments.DefaultFileCharacterSet); 56 } 57 } 58 saveSettings(); 59 </cfscript> 60 </cffunction> 11 61 62 <!------------------------------------------- PRIVATE -------------------------------------------> 12 63 64 <!--- ************************************************************* ---> 65 66 <cffunction name="parseSettings" access="private" returntype="void" output="false"> 67 <cfset var xmlString = ""> 68 <cfset var xmlSettings = ArrayNew(1)> 69 <cfset var x = 1> 70 <!--- Read File ---> 71 <cffile action="read" file="#instance.settingsFilePath#" variable="xmlString"> 72 <!--- Parse File ---> 73 <cfset instance.xmlObj = XMLParse(trim(xmlString))> 74 <cfset xmlSettings = instance.xmlObj.xmlRoot.Settings.xmlChildren> 75 76 <!--- Create Query ---> 77 <cfscript> 78 QueryAddRow(instance.qSettings,1); 79 for (x=1; x lte ArrayLen(xmlSettings); x=x+1){ 80 QueryAddColumn(instance.qSettings, trim(xmlSettings[x].xmlAttributes.name), "varchar" , ArrayNew(1)); 81 QuerySetCell(instance.qSettings, trim(xmlSettings[x].xmlAttributes.name), trim(xmlSettings[x].xmlAttributes.value),1); 82 } 83 </cfscript> 84 </cffunction> 85 86 <!--- ************************************************************* ---> 87 88 <cffunction name="saveSettings" access="private" returntype="void" output="false"> 89 <cflock type="exclusive" name="settingsfile_udpate" timeout="120"> 90 <cffile action="write" file="#instance.settingsFilePath#" output="#toString(instance.xmlObj)#"> 91 </cflock> 92 </cffunction> 93 94 <!--- ************************************************************* ---> 95 13 96 </cfcomponent> -
coldbox/trunk/src/system/dashboard/model/settings.cfc
r226 r239 7 7 <cfset variables.instance.hashAlg = "SHA-384"> 8 8 <cfset variables.instance.settingsFilePath = ExpandPath("config/settings.xml.cfm")> 9 <cfset variables.instance.rolloversFilePath = ExpandPath("config/rollovers.xml")> 9 10 <cfset variables.instance.qSettings = queryNew("")> 11 <cfset variables.instance.qRollovers = queryNew("pagesection,rolloverid, text","varchar,varchar,varchar")> 10 12 <cfset variables.instance.xmlObj = ""> 11 13 … … 14 16 <cffunction name="init" access="public" returntype="settings" output="false"> 15 17 <cfset parseSettings()> 18 <cfset parseRollovers()> 16 19 <cfreturn this> 17 20 </cffunction> … … 30 33 <cfargument name="proxyport" required="false" type="string" default=""> 31 34 <!--- Save Proxy Settings ---> 32 <cfquery name="qry" dbtype="query"> 33 update instance.qSettings 34 set proxyflag = <cfqueryparam cfsqltype="cf_sql_bit" value="">, 35 proxyserver = <cfqueryparam cfsqltype="cf_sql_varchar" value="">, 36 proxyuser = <cfqueryparam cfsqltype="cf_sql_varchar" value="">, 37 proxypassword = <cfqueryparam cfsqltype="cf_sql_varchar" value="">, 38 proxyport = <cfqueryparam cfsqltype="cf_sql_varchar" value="">, 39 </cfquery> 35 <cfset instance.xmlObj.xmlRoot.proxyflag.xmlText = arguments.proxyflag> 36 <cfset instance.xmlObj.xmlRoot.proxyserver.xmlText = arguments.proxyserver> 37 <cfset instance.xmlObj.xmlRoot.proxyuser.xmlText = arguments.proxyuser> 38 <cfset instance.xmlObj.xmlRoot.proxypassword.xmlText = arguments.proxypassword> 39 <cfset instance.xmlObj.xmlRoot.proxyport.xmlText = arguments.proxyport> 40 <!--- Savce XML ---> 41 <cfset saveSettings()> 42 <!--- Parse Settings Again ---> 43 <cfset instance.qSettings = queryNew("")> 44 <cfset parseSettings()> 40 45 <!--- Save XML ---> 41 46 <cfset saveSettings()> … … 51 56 <!--- ************************************************************* ---> 52 57 <cfset var rtnStruct = structnew()> 58 <cfset var x = 1> 53 59 <cfset rtnStruct.results = false> 54 60 <cfset rtnStruct.message = ""> … … 59 65 <cfelse> 60 66 <!--- Save Password ---> 61 <cfquery name="qry" dbtype="query"> 62 update instance.qSettings 63 set password = <cfqueryparam cfsqltype="cf_sql_varchar" value="#hash(arguments.newpassword,instance.hashAlg)#"> 64 </cfquery> 67 <cfset instance.xmlObj.xmlRoot.password.xmlText = hash(arguments.newpassword, instance.hashAlg)> 65 68 <!--- Savce XML ---> 66 69 <cfset saveSettings()> 70 <!--- Parse Settings Again ---> 71 <cfset instance.qSettings = queryNew("")> 72 <cfset parseSettings()> 73 <!--- Set Results ---> 74 <cfset rtnStruct.results = true> 67 75 </cfif> 68 76 <cfreturn rtnStruct> … … 90 98 <!--- ************************************************************* ---> 91 99 100 <!--- ************************************************************* ---> 101 102 <cffunction name="getRollovers" access="public" returntype="query" output="false"> 103 <cfreturn instance.qRollovers> 104 </cffunction> 105 106 <!--- ************************************************************* ---> 107 108 <cffunction name="getSettings" access="public" returntype="query" output="false"> 109 <cfreturn instance.qSettings> 110 </cffunction> 111 92 112 <!------------------------------------------- PRIVATE -------------------------------------------> 93 113 … … 116 136 117 137 <cffunction name="saveSettings" access="private" returntype="void" output="false"> 118 <cfset var xmlString = ""> 119 <cfset var setting = ""> 120 <cfset var i = ""> 121 <!--- Flatten the query ---> 122 <cfloop from="1" to="#listLen(instance.qSettings.columnList)#" index="i"> 123 <cfset setting = lcase(listgetAt(instance.qSettings.columnList,i))> 124 <cfset instance.xmlObj.settings[setting].xmlText = instance.qSettings[setting][1]> 125 </cfloop> 126 <!--- Write File ---> 138 <!--- Save the File ---> 127 139 <cffile action="write" file="#instance.settingsFilePath#" output="#toString(instance.xmlObj)#"> 128 140 </cffunction> … … 130 142 <!--- ************************************************************* ---> 131 143 144 <cffunction name="parseRollovers" access="private" returntype="void" output="false"> 145 <cfset var xmlString = ""> 146 <cfset var xmlChildren = ArrayNew(1)> 147 <cfset var xmlObj = ""> 148 <cfset var x = 1> 149 <cfset var j = 1> 150 <!--- Read File ---> 151 <cffile action="read" file="#instance.rolloversFilePath#" variable="xmlString"> 152 <!--- Parse File ---> 153 <cfset xmlObj = XMLParse(trim(xmlString))> 154 <!--- Create Query ---> 155 <cfscript> 156 for (x=1; x lte ArrayLen(xmlObj.rollovers.section); x=x+1){ 157 //Loop Through Rollovers 158 for(j=1; j lte ArrayLen(xmlObj.rollovers.section[x].XMLChildren) ; j=j+1){ 159 QueryAddRow(instance.qRollovers,1); 160 QuerySetCell(instance.qRollovers, "pagesection", trim(xmlObj.rollovers.section[x].XMLAttributes.id) ); 161 QuerySetCell(instance.qRollovers, "rolloverid", trim(xmlObj.rollovers.section[x].xmlChildren[j].xmlAttributes.id) ); 162 QuerySetCell(instance.qRollovers, "text", trim(xmlObj.rollovers.section[x].xmlChildren[j].xmlText) ); 163 } 164 } 165 </cfscript> 166 </cffunction> 167 168 <!--- ************************************************************* ---> 169 132 170 </cfcomponent> -
coldbox/trunk/src/system/dashboard/views/tags/header.cfm
r233 r239 56 56 <input type="text" name="q" size="20" accesskey="s" value="Search Documentation" style="font-size:9px" onclick="this.value='';" title="Search the documentation, tickets and changeset" /> 57 57 <input type="Submit" name="Search" value="Search" style="font-size:9px" /> 58 <input type="button" name="Search" value="Reload" style="font-size:9px" onClick="location.reload()" />59 58 </div> 60 59 -
coldbox/trunk/src/system/dashboard/views/vwHome.cfm
r235 r239 1 1 <cfoutput> 2 <div class="sidemenu"> 3 <!--- Title Bar ---> 4 <div class="sidemenu_title"> 5 <div class="sidemenu_title_img" ><img src="images/icons/home_27.gif"></div> 6 <div class="sidemenu_title_text" >System Information</div> 7 </div> 8 9 <!--- Sub Menu Links ---> 10 <ul> 11 <li><a href="?event=#getValue("xehHome")#">System Information</a></li> 2 #renderView("tags/rollovers")# 3 4 <!--- StyleSheet For cfc Viewer ---> 5 <link rel="stylesheet" href="/coldbox/system/includes/cfcviewer.css" type="text/css" /> 6 7 <table height="100%" width="100%" cellpadding="0" cellspacing="0" border="0"> 8 <tr> 9 <td valign="top" height="600" align="center"> 10 <!--- Content ---> 11 <div id="content"></div> 12 </td> 12 13 13 <li><a href="##">Online Resources</a></li> 14 15 <cfif not application.isBD> 16 <li><a href="##">CFC Documentation</a></li> 17 </cfif> 18 19 <li><a href="javascript:doEvent('#getValue("xehSchemaDocs")#', 'content', {})">Config Schema Docs</a></li> 20 </ul> 21 22 <br> 23 <hr style="width:95%;" size="1" /> 24 25 <div class="sidemenu_help" id="sidemenu_help"> 26 Help will be shown here, such as rollovers on all the links. 27 </div> 28 29 <div class="sidemenu_toolbar"> 30 31 <div class="sidemenu_toolbar_option"> 32 <img src="images/icons/print_icon.gif" align="absmiddle" id="btn_print" srcoff="images/icons/print_icon.gif" 33 srcon="images/icons/print_icon_on.gif" border="0" alt="Print!"> <a href="javascript:window.print()" onMouseOver="rollover(btn_print)" onMouseOut="rollout(btn_print)">Print</a> <br> 14 <td class="sidemenu" height="100%" valign="top"> 15 <!--- Title Bar ---> 16 <div class="sidemenu_title"> 17 <div class="sidemenu_title_img" ><img src="images/icons/home_27.gif"></div> 18 <div class="sidemenu_title_text" >System Information</div> 34 19 </div> 35 20 36 <div class="sidemenu_toolbar_option"> 37 <img src="images/icons/help_icon.gif" align="absmiddle" id="btn_help" srcoff="images/icons/help_icon.gif" 38 srcon="images/icons/help_icon_on.gif" border="0" alt="Help Tips!"> <a href="##" onMouseOver="rollover(btn_help)" onMouseOut="rollout(btn_help)">Help</a> <br> 39 </div> 21 <!--- Sub Menu Links ---> 22 <ul> 23 <li><a href="javascript:doEvent('#getValue("xehSystemInfo")#', 'content', {})" onMouseOver="getHint('sysinfo')" onMouseOut="resetHint()">System Information</a></li> 24 25 <li><a href="javascript:doEvent('#getValue("xehResources")#', 'content', {})" onMouseOver="getHint('onlineresources')" onMouseOut="resetHint()">Online Resources</a></li> 26 27 <cfif not application.isBD> 28 <li><a href="javascript:doEvent('#getValue("xehCFCDocs")#', 'content', {})" onMouseOver="getHint('cfcdocs')" onMouseOut="resetHint()">CFC Documentation</a></li> 29 </cfif> 30 </ul> 40 31 41 <div class="sidemenu_toolbar_option"> 42 <img src="images/icons/logout.gif" id="btn_logout" srcoff="images/icons/logout.gif" 43 srcon="images/icons/logout_on.gif" align="absmiddle" border="0" alt="Logout of the Dashboard"> 44 <a href="##" onClick="validateLogout() ? parent.window.location='index.cfm?event=#getValue("xehLogout")#' : null" onMouseOver="rollover(btn_logout)" onMouseOut="rollout(btn_logout)" title="Logout of the Dashboard">Logout</a> 45 </div> 46 </div> 47 48 </div> 32 #renderview("tags/sidemenu_tools")# 33 </td> 34 </tr> 35 </table> 49 36 50 <div class="content"> 51 52 </div> 37 <script language="javascript"> 38 //Populate system info 39 doEvent('#getValue("xehSystemInfo")#', 'content', {}); 40 </script> 53 41 </cfoutput> -
coldbox/trunk/src/system/dashboard/views/vwLogin.cfm
r233 r239 43 43 44 44 <div class="contentboxes_footer"> 45 <div style="margin-right:15px; margin-top:20px;">45 <div style="margin-right:15px;"> 46 46 <input type="submit" name="submit" value="Log In" /> 47 47 </div>
