Changeset 62
- Timestamp:
- 11/22/05 18:46:05
- Files:
-
- trunk/changelog.txt (modified) (1 diff)
- trunk/common/javascript/fields.js (modified) (1 diff)
- trunk/common/stylesheet/mozilla/base.css (modified) (3 diffs)
- trunk/common/stylesheet/mozilla/button-download.png (added)
- trunk/dbgraphic.php (modified) (1 diff)
- trunk/include/common_functions.php (modified) (2 diffs)
- trunk/include/search_class.php (modified) (2 diffs)
- trunk/install/createtables.sql (modified) (3 diffs)
- trunk/install/files.sql (modified) (1 diff)
- trunk/install/updatev0.61.sql (modified) (2 diffs)
- trunk/modules/base/adminsettings.php (modified) (4 diffs)
- trunk/modules/base/attachments_records.php (added)
- trunk/modules/base/files_addedit.php (modified) (4 diffs)
- trunk/modules/base/include/adminsettings_include.php (modified) (1 diff)
- trunk/modules/base/include/attachments_addedit_include.php (added)
- trunk/modules/base/include/attachments_search_functions.php (added)
- trunk/modules/base/include/files_addedit_include.php (modified) (5 diffs)
- trunk/modules/base/include/files_search_functions.php (modified) (2 diffs)
- trunk/modules/base/include/reports_search_functions.php (modified) (1 diff)
- trunk/modules/base/include/tasks_search_functions.php (modified) (1 diff)
- trunk/modules/base/javascript/file.js (added)
- trunk/modules/base/notes_records.php (modified) (1 diff)
- trunk/modules/base/tabledefs_addedit.php (modified) (1 diff)
- trunk/modules/base/tabledefs_columns.php (modified) (1 diff)
- trunk/modules/bms/adminsettings.php (modified) (2 diffs)
- trunk/modules/bms/clients_addedit.php (modified) (6 diffs)
- trunk/modules/bms/clients_attachments.php (added)
- trunk/modules/bms/clients_notes.php (modified) (2 diffs)
- trunk/modules/bms/clients_purchasehistory.php (modified) (2 diffs)
- trunk/modules/bms/include/clientemailprojects_search_functions.php (modified) (1 diff)
- trunk/modules/bms/include/clients_addedit_include.php (modified) (5 diffs)
- trunk/modules/bms/include/clients_functions.php (modified) (2 diffs)
- trunk/modules/bms/include/clients_search_functions.php (modified) (1 diff)
- trunk/modules/bms/include/discounts_search_functions.php (modified) (1 diff)
- trunk/modules/bms/include/invoices_functions.php (modified) (2 diffs)
- trunk/modules/bms/include/invoices_search_functions.php (modified) (4 diffs)
- trunk/modules/bms/include/productcategories_search_functions.php (modified) (1 diff)
- trunk/modules/bms/include/products_functions.php (modified) (2 diffs)
- trunk/modules/bms/include/products_search_functions.php (modified) (1 diff)
- trunk/modules/bms/include/tax_search_functions.php (modified) (1 diff)
- trunk/modules/bms/install/createtables.sql (modified) (1 diff)
- trunk/modules/bms/install/updatev0.61.sql (modified) (1 diff)
- trunk/modules/bms/invoices_addedit.php (modified) (3 diffs)
- trunk/modules/bms/invoices_attachments.php (added)
- trunk/modules/bms/invoices_client_ajax.php (modified) (3 diffs)
- trunk/modules/bms/invoices_notes.php (modified) (1 diff)
- trunk/modules/bms/javascript/invoice.js (modified) (2 diffs)
- trunk/modules/bms/products_attachments.php (added)
- trunk/modules/bms/products_notes.php (modified) (1 diff)
- trunk/modules/bms/report/invoices_pdfinvoice.php (modified) (2 diffs)
- trunk/modules/bms/report/invoices_pdfpackinglist.php (modified) (2 diffs)
- trunk/modules/bms/report/invoices_pdfquote.php (modified) (2 diffs)
- trunk/modules/bms/report/invoices_pdfworkorder.php (modified) (2 diffs)
- trunk/servefile.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/changelog.txt
r61 r62 35 35 - PDF reports are now printed directly, instead of writing to a temp file. 36 36 - Fixed recording of times in database. 37 - Added DB file system. 38 - Added attachment sections to invoices, product, and clients. 39 - Fixed caching problem with graphics. 40 - Added default tax area to client. 37 41 38 42 phpBMS v0.602/ BMS module v0.602 trunk/common/javascript/fields.js
r52 r62 282 282 function formatCurrency(thenumber){ 283 283 var newdollar,retval 284 284 thenumber=thenumber.toString(); 285 285 //check for number 286 286 if (isNaN(parseFloat(thenumber)) || thenumber.length!=((parseFloat(thenumber)).toString()).length) thenumber="0.00"; 287 287 288 // add the dollar sign... remember that if it is a negative number, the minus sign goes in front 288 289 if(thenumber.charAt(0)=="-") { trunk/common/stylesheet/mozilla/base.css
r14 r62 81 81 .huge{font-size : 17px;} 82 82 .large{font-size : 16px;} 83 .small { font-size : 11px;}83 .small,.notes { font-size : 11px;} 84 84 .tiny { font-size : 10px} 85 85 .mono {font-family:'Courier New', Courier, mono;} 86 86 87 87 .standout,#statusmessage{ background-color:#0B63A2; color:white; font-weight:bold; font-size:15px; padding:4px;} 88 89 .notes {color:#DF0005} 88 90 89 91 .important {font-weight:bold;} … … 293 295 .qh1, .qh2{background-color:black; cursor: pointer; cursor: hand;} 294 296 .qh1 td, .qh2 td{color:white; border-right-color: white; border-bottom-color: white;} 297 .qh1, .qh2{background-color:black; cursor: pointer; cursor: hand;} 298 .qh1 a, .qh2 a{color:white;} 295 299 296 300 … … 312 316 .smallQueryTable td{background-color:white;border-bottom:1px solid #CCCCCC; border-right:1px solid #CCCCCC; padding:2px;padding-left:4px; padding-right:4px;cursor:pointer;} 313 317 .smallQueryTable tr:Hover td{background-color:#999999;color:white;text-decoration:none;} 318 .smallQueryTable tr:Hover td a{color:white;} 314 319 .smallQueryTableSelected td{background-color:black;color:white} 320 .smallQueryTableSelected a{color:white} 315 321 .smallQueryTable tr.smallQueryTableSelected:Hover td{background-color:black;color:white} 316 322 /* ============================================================================== */ trunk/dbgraphic.php
r51 r62 35 35 +-------------------------------------------------------------------------+ 36 36 */ 37 session_cache_limiter('private'); 37 38 require_once("include/session.php"); 38 39 if(!isset($_GET["t"]) or !isset($_GET["r"]) or !isset($_GET["f"]) or !isset($_GET["mf"])) die("Invlaid Paramateers Set"); trunk/include/common_functions.php
r61 r62 57 57 else echo "<a href=\"".$theitem["href"]."\">".$theitem["name"]."</a>"; 58 58 if ($theitem["notify"]) { 59 ?> <img src="<?php echo $_SESSION["app_path"]?>common/stylesheet/<?php echo $_SESSION["stylesheet"] ?>/button-note.png" alt="*" align="absmiddle" width="16" height="16" border="0"><?php59 ?> <img src="<?php echo $_SESSION["app_path"]?>common/stylesheet/<?php echo $_SESSION["stylesheet"] ?>/button-note.png" alt="*" align="absmiddle" width="16" height="16" border="0"><?php 60 60 } 61 61 ?></td><?php … … 272 272 $value=formatDateTime($value); 273 273 break; 274 case "filelink": 275 $value="<a href=\"".$_SESSION["app_path"]."servefile.php?i=".$value."\" style=\"display:block;\"><img src=\"".$_SESSION["app_path"]."common/stylesheet/".$_SESSION["stylesheet"]."/button-download.png\" align=\"middle\" alt=\"view\" width=\"16\" height=\"16\" border=\"0\" /></a>"; 274 276 } 275 277 return $value; trunk/include/search_class.php
r58 r62 116 116 mysql_data_seek($this->queryresult,0); 117 117 while($therecord = mysql_fetch_array($this->queryresult)){ 118 ?><tr class="qr<?php echo $rownum?>" id="r-<?php echo $therecord[" id"]?>" <?php118 ?><tr class="qr<?php echo $rownum?>" id="r-<?php echo $therecord["theid"]?>" <?php 119 119 120 120 if ($this->options["select"]) { … … 689 689 690 690 $this->therecords=$this->thetabledef["querytable"]." ".$this->queryjoinclause." WHERE ".$this->querywhereclause." ORDER BY ".$this->querysortorder; 691 $this->querystatement = "SELECT DISTINCT ".$ querycolumns." FROM ".$this->therecords;691 $this->querystatement = "SELECT DISTINCT ".$this->thetabledef["maintable"].".id as theid,".$querycolumns." FROM ".$this->therecords; 692 692 693 693 parent::issueQuery(); trunk/install/createtables.sql
r60 r62 98 98 99 99 100 CREATE TABLE tablecolumns(101 idint(11) NOT NULL auto_increment,102 tabledefidint(11) NOT NULL default '0',103 namevarchar(64) NOT NULL default '',100 CREATE TABLE `tablecolumns` ( 101 `id` int(11) NOT NULL auto_increment, 102 `tabledefid` int(11) NOT NULL default '0', 103 `name` varchar(64) NOT NULL default '', 104 104 `column` varchar(255) NOT NULL default '', 105 alignvarchar(16) NOT NULL default '',106 footerqueryvarchar(255) default '',107 displayorderint(11) NOT NULL default '0',108 sortordervarchar(128) default '',109 wraptinyint(1) NOT NULL default '0',110 sizevarchar(16) NOT NULL default '',111 format enum('date','time','currency','boolean','datetime') default NULL,112 PRIMARY KEY ( id),113 KEY tabledef (tabledefid),114 KEY displayorder (displayorder)105 `align` varchar(16) NOT NULL default '', 106 `footerquery` varchar(255) default '', 107 `displayorder` int(11) NOT NULL default '0', 108 `sortorder` varchar(128) default '', 109 `wrap` tinyint(1) NOT NULL default '0', 110 `size` varchar(16) NOT NULL default '', 111 `format` enum('date','time','currency','boolean','datetime','filelink') default NULL, 112 PRIMARY KEY (`id`), 113 KEY `tabledef` (`tabledefid`), 114 KEY `displayorder` (`displayorder`) 115 115 ) TYPE=MyISAM; 116 116 … … 214 214 `id` int(11) NOT NULL auto_increment, 215 215 `name` varchar(128) NOT NULL default '', 216 `accesslevel` int(11) NOT NULL default '0', 217 `servename` varchar(64) NOT NULL default '', 216 `description` text, 218 217 `file` longblob, 219 218 `type` varchar(100) default '', … … 222 221 `modifiedby` int(11) default '0', 223 222 `modifieddate` timestamp(14) NOT NULL, 223 `accesslevel` int(11) NOT NULL default '0', 224 224 PRIMARY KEY (`id`) 225 225 ) TYPE=MyISAM; trunk/install/files.sql
r60 r62 1 INSERT INTO files VALUES (1,' Printed Logo','logo.png','PNG\r\n\Z\n\0\0\0\rIHDR\0\0\0\0\0]\0\0\0S°\0\0\0gAMA\0\0¯È7é\0\0\0tEXtSoftware\0Adobe ImageReadyqÉe<\0\0\0`PLTE666ÑÑѶ¶¶óó󪪪kkk rrrÅÅÅèèèÛÛÛ¿¿¿|||XXXÞÞÞðððÉÉÉâââKKK&&&QQQPPP%%%bbbcccÿÿÿV\"l\0\0\0ØIDATxÚb \0@£A\0\0D£påΡ\0D£p஡\04ÃA±I#<^inT)&1^v99YYv^.f°@\0a /¿¬X#%á I~8°\0] +t*#ËÏ&¬WVVN®ÝV~šŽ¬B\"\n0àgj Žp\0« !Ë*&B^8HR »ìYšXYþåE\n\'9Y>4Dà¡\0bðÂÅPtA[Y PŠQJ;ýó4`±³XEéæUkÑbEò,,DXáA%]^ ÂY 48@ÙÞá\0 \0Hš,óCÓ$ݰ¢ÀÓÜHx~qØäå|¬²ð ¹\ZlÌdäIJÒ¬RÈÂD@T`*QãJáO,<¡#ùÈŠ1\0,úå`@óØ-üÌ/d\0: Ωû\r-[ 0@\Z6¬pÁÊHšw D0È\"r%\"`)UÄp€(_ Õðr b\rV\".;z¶@$) ZÁÀJGx ,+=\0²rBZÜ \ZA9Ž 8`Y ìgfF6V9xE**¹¹a>%ä67<aCT r\Z°\"e5+XØÀP á &+€Mq <.á\0/ÄàÙQsÁœ T±0!égE*¡ùBQÞq!ŒÂÌÇ%a\0rÙËr°àcg;ÞåÈáâ]øAá\0ËéŒPQdË a&ÇÏ@CµcÖ±à@àÂQÙ\"׊Ð%,lÅB×ô\0I(+%Àá\0M\nl²ÐÒ%[œÃ¯#åá9][ xËìd $ AÌcåÆépFNNQ<é(-ÏßèÚáõr80Âê\0p2çú^ ]^ûÁB»áu#0ÉÂÊIl.\0 0ßÃ#¬¶Þx¡á\"Ö¯úY\\äiI9lá Ä\"\0îl0°sâÖL=ÈÚ5 ©CY`ÅÔ±bÈMnHÛ\næ)`p2ÂYlÑ @ЊR³M^y1#ò`AnJYà@\0zX0Â*ÄrBiIIvp_DY;¢Ý/`)žÀMr,PßÂkNfh¶âBä/x8xØò7@\01\0{$PÃËXµÊÒµEjÓBý dË \0È¿B(á $!)G±jT;Ì=šå$<²@V12¢ïù ) OÖuÃR<@\01ÈsÁœ.È\ZÀj©£É\'x õ;ØÐ`\0 !x¿[KH)À!Ð. Ñ\n ÚeáD8Á\Zvò^ÖÂcuHa5\'ŽUÁ-/XY u¬&äÅÈ\Z\0ÄÀÒ|¶5eyQ»úðJ8B¢K\\\0§Hé\\2HsqÉ1À\"Š]M»²vx& ç>vXHÒwA>»\ZV±³B<ÃMW M,à(rC\nÒ\0 €:ÑbåçbácDîâBJ8p}-þŸäqx8\0=/ fa$\nvIí +\'Á®\rG±ñ²\"ZüÐ-/¬ cgu=P@œHx Ü\0Eî5Èñó!7\rÑru=`Mk~€ò(YQÂ8\ntšWEaá\0äq!ÉJÂã§vQHß> /G:3R\Z \nâExxa±@JÄ8Cä:\0bàE4%Ñ»žhõH5$QÊ^šOØaõ€8FBF/d`©5ÙíIx_æ0Ä +¬Æ4,ã³Á&À=CšÃåàYÑS¯\0UQ¡ ÀRHmÅIÐaD\nI#$4F9Á²(² ];Dš<b°):(C5Ðp7ù!IHrVt`ÏóBº(ÈWš¡Ð¶@\01È\"Æ|Àvòs³C¹ÜÆ/Žš$>D8\0ýÌÞJyÒ®AÀ`W\"räS;b \0%ðó,ŽOÐf!Ø¥Œ°<À+xqc°£ PFe3€\'kMô³ aAÎÍ`ÿ@󪀢Æ4°hš@)³Æa@RçÁkQy€±tA\Z&Œ0gó\"ÆgkXXB d!ãN,à1nHÙd²1!rrzÅl@Z¥LR vx8È\"UáýaH !oô@ûUŸtÀÖýä %,~€¡hxJÀ@rðÁYYØð¿¬ÔÃìÊÑùBIX&äÀØÇí`ÍHp8Hb×ÔÉhúñó?Rúö÷a1Ã\nu&ldIÚJàG.äåáC|03-\0b@.`£¬Ð±/>9i\0 \Z&äpÀô8cp;XÃA^_`ÕFDmÁ\\bG4ýA±ËË,ŒHKPaë pC>ÐðBÄc Ò@<@\01ÀG.ÁeŒKNfVDQ\rML ÒÀ§ÌpDJžŽªD¯Qó \rñÁ:Ðp`ò\\Ð2\\+\'f¯\"ï:\0ÄÀÞAfZT§¢aHJb÷t\0ûxR8àÔÖyDéoÂGùÁ#oôÀËíLò¬CÒ-ŒÃa·òp7@\01pÁ=4¡ÁÍ+`xÓþp!àá\0s!#J7înXÆÒF37R8 â\"&·àÅ%@\010AÍ+ÂñbHShd·G(øtrz\0g}h»VØñB=Içü|§Bëø`,¶)9AÄx6?@\01p£ ¹&ÄÊ0l[_A)X°Ïw¬=K»€\"\r\"»Qw²ÀÃæ%;¹à3uò°Á\Z°¬Slð~¹,@\01ç ©ÔÀâFH ux ñÃM( >§Ör`z@ª/PÛñpİÀkØ4?Êš RÙ*\'1í2â ¶ À%Rj\'*F9äñ)ÞÁéHûA[÷%$ñi÷6QÒ3¢õÃÂä¹\n1ÄŒ£+`\"@\01*GDj,Æ|.>ªÏ\ZX\ZBq\\ùB9_àÐl_! ÝÏ ð*#lšøó 0\"AsÖ9ØL\0° [X24m BçÈK\0Hs f³€#¶úÔsÆ$óVí@ìòp÷¡Û#ÍØsóÂ\"êAnøä-Hr úŒ3+ŒQ @Àp`Fd\nXmËÎ=B\ZŠvcËô(ÆâLòDXµËŽÃ\"RŸdEL<óËça\nøaMJèÐŒD(š:ÅÍã $kŠýÅXºè²hãHã0¢IPz\'/pkgø8 <žzÀ=DøX##bŒ$Z²Ê€ÄÆÇ\nn1€Q8Vf\0bR;Ô© ;V°2Ë£§èð2ŒcÍ\0k6jOJBÆ2qiGLq×Ëq±#zþâZœBA*ËDPÂìU6H%²Fiø Œ2«> 2Àìð(œ$xtW;J90ŽKÂgàÃHC0Hë6åá`DY+\0IðcEòÊóÊ!8bÌ`g غ YÄšR!_u :ù{ÏAF€áP8ëMI|ª8òÐpEbD\Z2ãu»Q\ZH\\ð.Ô VÐArÈËk36Ð5.\0Ä Ôr@n, \n6ö€gâädÑB<íjIx8H@*Yžväî>ÊÈ({òÁ\Z7°áI€É]Øä|ÂÞcsðpAê^>°Ã{×H\rÞ,EhÃy²\nØñ¬#Ei?H\"ŽÃô«\\Ä\Z0Y€%Zð&5¿ <b,¢ãiZ3£, vÏYäPÖC\"d!ó!\0¯/y#\"§9ØX&Fz\0OJ@ Ä/°d§Ë ÈCc¢eœ ÒÂ5`?\ny®¹ÎÛ5èïÀÓ,°pEÀÉ!- €6+Ry ŒŽsI$BååEQŠ(ÙEñ®A7%QŽK\"k\'Å?ü|Äy12𡎚gfâGY:«fu\0¹mË,&+R.ÉB³&)¢!*.PQŽèûXàË`á\0ÑÔEÖÎÇò?̵ŒŒ\\,L(®`dükøPÔ1óg!+/òòq\0b@[^Í-Hßµ Ÿ P;EsŸŒ<@\0aôuÙxáå#»3Q!àêo\0 !Æ(H|2+\0ì¥0=²p\0 \n\"Tr @\0Š\0 Ñp\0\0\Z\r\0 rÃAr @\0QS9 @ä§IÉá\0hŽ|\0\0\"7À=&²¥P;õ@\0î÷\0\0\Z\r\0 Ñp\0\0\">ÙØØšw 34h0ÐLÐ\\$¢àFêÆ[\0\">ž¥€¥©çXi `ò€4õÂ\rh47z\0h ÂM\nìX \n\0`hHËSÓl)Rà *x \0P8ÇÀŠ\0\"%€š 1/p\0@ò$YP-€H\0\\Í\nÀ çÈàAßÿ=çO«±[j} ¢T5\nÄÇW³äz\06Å|\\ìý YëD5p3ÌÛ)cxç|¯w°)N\ZgR·çépe`b4ö?1i¬Q,4\ZªòYʬÉÄÈŽ£ñ¿ ø^Ô^hA$V/ó#\0ÕÖ²0ÃÇÊÀ°C{Øÿÿ倲)(ŽZè+ñTäÁAS¬Õ\r ÉÍæn¥>Ÿ<Òál|t§dÊé6~sЩ1YÒÂ5PvÂÔk©\Zj?#£>< ç§U+Çò Ž©ñ;§á~ý\nÀD#°Ö¡wÒÿÿ²1ÁÖAÓ£^\'üe0zEdX\r?EÏ\'xxa`¢AJMÉÅMh,iªÁ{.S¹þŽ4HvÃβî ]Ç#Ÿ?8Š!\"Æ¡^Ø¥\"ª®_*aV)Ew.â\"÷¿e1 lóñ9êµÙvUÆÌ¢j¯ É=ø;ÀÜåÃç!Ž4Tc ó¶ôu5H&5æhÊøéÉ.ý`uÿuï³xÇÞ0Ü\rx\ZnÇÌ},Rhö}Í\0ÁÙ|\\Cè\'\0V0Â21ó°àÁÿÿrÐâÉ\rÒÒÊù\"åhlé|:ò}$g:9¿ÇŒŽ»ÀÃh?Áù£!á.*ê\ra¥®~ËÔ·Yp2Õþe$xÐËÚÚÝ?@É .ÌD6¯cî~ž¬a¶@av+ì ÿÿçÖêv-(&&±G]-6Ô+ÄäØ>»ýÔÒcŽÍ2Éþ>áÊVóãx€]ŒáÉçœCL?z_\\?l<«qp ÙÀJÇp¯\0\\V1À +Sºõ®üÿÄëÂ\'Iâ%ó2¯éñLY»ÐbZ7œ\'ý~Ù¡\\hh{¶>ÁšúÁ©_7nkPð^aÜK×+ÒJ~a\\ÊD\0Í6Ð%\0å0ÃÐÒ¡[6îËÊv~dEó lAÕŸEdzjŽê¡þPè¿ËŸîìgDàŒ\"méFÜ8î±ÉŒËiImpñ>I€ %:š&\"ë\r£|ž,c\0@8ž0óÿ§*p6*-m¡ñàÀl`Ê èd»vEɺÂÿ·SàÍÈ€æôE~]Í yL+y9>#dî<-EZ7=Ù/VÀ Û±ßl+Hatàzèÿ¹µi&cg±Ä&:IÆIåaR\nÉÉëüëwÁ/äèŸ7^wru[TÒy¿è<YªwvÙQÅ6ycüújs8zþÓÐÒÇ¢öhõxož®A/»pÿÿåŽÝôFL\ZÏ<TË¡Uñ@šŸ lÐiÂÎòà{`DÚë)×ôD·K÷ÿ}q\\3É쪵òÌzVÙúÉ C«F÷ÄX{$êÐ_È.cBFŒAþýoùÅÖªq\0Ò>Î>|\"®ó$íûÎÂi[ J]ÌIyYìÚ$œüE4\"ûë\'^¿È,¢ÏÐ7ûFMOÞÀF6ËÍÄxþJïÖve9]ïÐú\rZîòº,@vú\Z\'ŽædBwªf9,_ §³Œ\0Û66ÄJp«QøË#ç.P[Éa`J³³À:uH ºÚR\0\0Ac_Qwèþ·ÌW5ûJsn\nsŠ÷6XÁ[Unè5-\\é!ÿËâž DõU@QRÁÃ>ðý.«ã]r|~7Z®\0Àn×RJ`o3\0@\0á©P\rÇD=à Ý?ä>\0Ð`N°\'u\0¬Ï- Ü\0Â(UºHB=óÄ u¶±*\0\ZYóÜšå0\0 Ñy\0 Ñp\0\0\Z\r\00\0tP|O;ë\0\0\0\0IEND®B`','image/png',2,'2005-11-21 15:15:49',2,20051121160025,90);1 INSERT INTO files VALUES (1,'logo.png','Company Logo Used in PDF reports','PNG\r\n\Z\n\0\0\0\rIHDR\0\0\0\0\0]\0\0\0S°\0\0\0gAMA\0\0¯È7é\0\0\0tEXtSoftware\0Adobe ImageReadyqÉe<\0\0\0`PLTE666ÑÑѶ¶¶óó󪪪kkk rrrÅÅÅèèèÛÛÛ¿¿¿|||XXXÞÞÞðððÉÉÉâââKKK&&&QQQPPP%%%bbbcccÿÿÿV\"l\0\0\0ØIDATxÚb \0@£A\0\0D£påΡ\0D£p஡\04ÃA±I#<^inT)&1^v99YYv^.f°@\0a /¿¬X#%á I~8°\0] +t*#ËÏ&¬WVVN®ÝV~šŽ¬B\"\n0àgj Žp\0« !Ë*&B^8HR »ìYšXYþåE\n\'9Y>4Dà¡\0bðÂÅPtA[Y PŠQJ;ýó4`±³XEéæUkÑbEò,,DXáA%]^ ÂY 48@ÙÞá\0 \0Hš,óCÓ$ݰ¢ÀÓÜHx~qØäå|¬²ð ¹\ZlÌdäIJÒ¬RÈÂD@T`*QãJáO,<¡#ùÈŠ1\0,úå`@óØ-üÌ/d\0: Ωû\r-[ 0@\Z6¬pÁÊHšw D0È\"r%\"`)UÄp€(_ Õðr b\rV\".;z¶@$) ZÁÀJGx ,+=\0²rBZÜ \ZA9Ž 8`Y ìgfF6V9xE**¹¹a>%ä67<aCT r\Z°\"e5+XØÀP á &+€Mq <.á\0/ÄàÙQsÁœ T±0!égE*¡ùBQÞq!ŒÂÌÇ%a\0rÙËr°àcg;ÞåÈáâ]øAá\0ËéŒPQdË a&ÇÏ@CµcÖ±à@àÂQÙ\"׊Ð%,lÅB×ô\0I(+%Àá\0M\nl²ÐÒ%[œÃ¯#åá9][ xËìd $ AÌcåÆépFNNQ<é(-ÏßèÚáõr80Âê\0p2çú^ ]^ûÁB»áu#0ÉÂÊIl.\0 0ßÃ#¬¶Þx¡á\"Ö¯úY\\äiI9lá Ä\"\0îl0°sâÖL=ÈÚ5 ©CY`ÅÔ±bÈMnHÛ\næ)`p2ÂYlÑ @ЊR³M^y1#ò`AnJYà@\0zX0Â*ÄrBiIIvp_DY;¢Ý/`)žÀMr,PßÂkNfh¶âBä/x8xØò7@\01\0{$PÃËXµÊÒµEjÓBý dË \0È¿B(á $!)G±jT;Ì=šå$<²@V12¢ïù ) OÖuÃR<@\01ÈsÁœ.È\ZÀj©£É\'x õ;ØÐ`\0 !x¿[KH)À!Ð. Ñ\n ÚeáD8Á\Zvò^ÖÂcuHa5\'ŽUÁ-/XY u¬&äÅÈ\Z\0ÄÀÒ|¶5eyQ»úðJ8B¢K\\\0§Hé\\2HsqÉ1À\"Š]M»²vx& ç>vXHÒwA>»\ZV±³B<ÃMW M,à(rC\nÒ\0 €:ÑbåçbácDîâBJ8p}-þŸäqx8\0=/ fa$\nvIí +\'Á®\rG±ñ²\"ZüÐ-/¬ cgu=P@œHx Ü\0Eî5Èñó!7\rÑru=`Mk~€ò(YQÂ8\ntšWEaá\0äq!ÉJÂã§vQHß> /G:3R\Z \nâExxa±@JÄ8Cä:\0bàE4%Ñ»žhõH5$QÊ^šOØaõ€8FBF/d`©5ÙíIx_æ0Ä +¬Æ4,ã³Á&À=CšÃåàYÑS¯\0UQ¡ ÀRHmÅIÐaD\nI#$4F9Á²(² ];Dš<b°):(C5Ðp7ù!IHrVt`ÏóBº(ÈWš¡Ð¶@\01È\"Æ|Àvòs³C¹ÜÆ/Žš$>D8\0ýÌÞJyÒ®AÀ`W\"räS;b \0%ðó,ŽOÐf!Ø¥Œ°<À+xqc°£ PFe3€\'kMô³ aAÎÍ`ÿ@󪀢Æ4°hš@)³Æa@RçÁkQy€±tA\Z&Œ0gó\"ÆgkXXB d!ãN,à1nHÙd²1!rrzÅl@Z¥LR vx8È\"UáýaH !oô@ûUŸtÀÖýä %,~€¡hxJÀ@rðÁYYØð¿¬ÔÃìÊÑùBIX&äÀØÇí`ÍHp8Hb×ÔÉhúñó?Rúö÷a1Ã\nu&ldIÚJàG.äåáC|03-\0b@.`£¬Ð±/>9i\0 \Z&äpÀô8cp;XÃA^_`ÕFDmÁ\\bG4ýA±ËË,ŒHKPaë pC>ÐðBÄc Ò@<@\01ÀG.ÁeŒKNfVDQ\rML ÒÀ§ÌpDJžŽªD¯Qó \rñÁ:Ðp`ò\\Ð2\\+\'f¯\"ï:\0ÄÀÞAfZT§¢aHJb÷t\0ûxR8àÔÖyDéoÂGùÁ#oôÀËíLò¬CÒ-ŒÃa·òp7@\01pÁ=4¡ÁÍ+`xÓþp!àá\0s!#J7înXÆÒF37R8 â\"&·àÅ%@\010AÍ+ÂñbHShd·G(øtrz\0g}h»VØñB=Içü|§Bëø`,¶)9AÄx6?@\01p£ ¹&ÄÊ0l[_A)X°Ïw¬=K»€\"\r\"»Qw²ÀÃæ%;¹à3uò°Á\Z°¬Slð~¹,@\01ç ©ÔÀâFH ux ñÃM( >§Ör`z@ª/PÛñpİÀkØ4?Êš RÙ*\'1í2â ¶ À%Rj\'*F9äñ)ÞÁéHûA[÷%$ñi÷6QÒ3¢õÃÂä¹\n1ÄŒ£+`\"@\01*GDj,Æ|.>ªÏ\ZX\ZBq\\ùB9_àÐl_! ÝÏ ð*#lšøó 0\"AsÖ9ØL\0° [X24m BçÈK\0Hs f³€#¶úÔsÆ$óVí@ìòp÷¡Û#ÍØsóÂ\"êAnøä-Hr úŒ3+ŒQ @Àp`Fd\nXmËÎ=B\ZŠvcËô(ÆâLòDXµËŽÃ\"RŸdEL<óËça\nøaMJèÐŒD(š:ÅÍã $kŠýÅXºè²hãHã0¢IPz\'/pkgø8 <žzÀ=DøX##bŒ$Z²Ê€ÄÆÇ\nn1€Q8Vf\0bR;Ô© ;V°2Ë£§èð2ŒcÍ\0k6jOJBÆ2qiGLq×Ëq±#zþâZœBA*ËDPÂìU6H%²Fiø Œ2«> 2Àìð(œ$xtW;J90ŽKÂgàÃHC0Hë6åá`DY+\0IðcEòÊóÊ!8bÌ`g غ YÄšR!_u :ù{ÏAF€áP8ëMI|ª8òÐpEbD\Z2ãu»Q\ZH\\ð.Ô VÐArÈËk36Ð5.\0Ä Ôr@n, \n6ö€gâädÑB<íjIx8H@*Yžväî>ÊÈ({òÁ\Z7°áI€É]Øä|ÂÞcsðpAê^>°Ã{×H\rÞ,EhÃy²\nØñ¬#Ei?H\"ŽÃô«\\Ä\Z0Y€%Zð&5¿ <b,¢ãiZ3£, vÏYäPÖC\"d!ó!\0¯/y#\"§9ØX&Fz\0OJ@ Ä/°d§Ë ÈCc¢eœ ÒÂ5`?\ny®¹ÎÛ5èïÀÓ,°pEÀÉ!- €6+Ry ŒŽsI$BååEQŠ(ÙEñ®A7%QŽK\"k\'Å?ü|Äy12𡎚gfâGY:«fu\0¹mË,&+R.ÉB³&)¢!*.PQŽèûXàË`á\0ÑÔEÖÎÇò?̵ŒŒ\\,L(®`dükøPÔ1óg!+/òòq\0b@[^Í-Hßµ Ÿ P;EsŸŒ<@\0aôuÙxáå#»3Q!àêo\0 !Æ(H|2+\0ì¥0=²p\0 \n\"Tr @\0Š\0 Ñp\0\0\Z\r\0 rÃAr @\0QS9 @ä§IÉá\0hŽ|\0\0\"7À=&²¥P;õ@\0î÷\0\0\Z\r\0 Ñp\0\0\">ÙØØšw 34h0ÐLÐ\\$¢àFêÆ[\0\">ž¥€¥©çXi `ò€4õÂ\rh47z\0h ÂM\nìX \n\0`hHËSÓl)Rà *x \0P8ÇÀŠ\0\"%€š 1/p\0@ò$YP-€H\0\\Í\nÀ çÈàAßÿ=çO«±[j} ¢T5\nÄÇW³äz\06Å|\\ìý YëD5p3ÌÛ)cxç|¯w°)N\ZgR·çépe`b4ö?1i¬Q,4\ZªòYʬÉÄÈŽ£ñ¿ ø^Ô^hA$V/ó#\0ÕÖ²0ÃÇÊÀ°C{Øÿÿ倲)(ŽZè+ñTäÁAS¬Õ\r ÉÍæn¥>Ÿ<Òál|t§dÊé6~sЩ1YÒÂ5PvÂÔk©\Zj?#£>< ç§U+Çò Ž©ñ;§á~ý\nÀD#°Ö¡wÒÿÿ²1ÁÖAÓ£^\'üe0zEdX\r?EÏ\'xxa`¢AJMÉÅMh,iªÁ{.S¹þŽ4HvÃβî ]Ç#Ÿ?8Š!\"Æ¡^Ø¥\"ª®_*aV)Ew.â\"÷¿e1 lóñ9êµÙvUÆÌ¢j¯ É=ø;ÀÜåÃç!Ž4Tc ó¶ôu5H&5æhÊøéÉ.ý`uÿuï³xÇÞ0Ü\rx\ZnÇÌ},Rhö}Í\0ÁÙ|\\Cè\'\0V0Â21ó°àÁÿÿrÐâÉ\rÒÒÊù\"åhlé|:ò}$g:9¿ÇŒŽ»ÀÃh?Áù£!á.*ê\ra¥®~ËÔ·Yp2Õþe$xÐËÚÚÝ?@É .ÌD6¯cî~ž¬a¶@av+ì ÿÿçÖêv-(&&±G]-6Ô+ÄäØ>»ýÔÒcŽÍ2Éþ>áÊVóãx€]ŒáÉçœCL?z_\\?l<«qp ÙÀJÇp¯\0\\V1À +Sºõ®üÿÄëÂ\'Iâ%ó2¯éñLY»ÐbZ7œ\'ý~Ù¡\\hh{¶>ÁšúÁ©_7nkPð^aÜK×+ÒJ~a\\ÊD\0Í6Ð%\0å0ÃÐÒ¡[6îËÊv~dEó lAÕŸEdzjŽê¡þPè¿ËŸîìgDàŒ\"méFÜ8î±ÉŒËiImpñ>I€ %:š&\"ë\r£|ž,c\0@8ž0óÿ§*p6*-m¡ñàÀl`Ê èd»vEɺÂÿ·SàÍÈ€æôE~]Í yL+y9>#dî<-EZ7=Ù/VÀ Û±ßl+Hatàzèÿ¹µi&cg±Ä&:IÆIåaR\nÉÉëüëwÁ/äèŸ7^wru[TÒy¿è<YªwvÙQÅ6ycüújs8zþÓÐÒÇ¢öhõxož®A/»pÿÿåŽÝôFL\ZÏ<TË¡Uñ@šŸ lÐiÂÎòà{`DÚë)×ôD·K÷ÿ}q\\3É쪵òÌzVÙúÉ C«F÷ÄX{$êÐ_È.cBFŒAþýoùÅÖªq\0Ò>Î>|\"®ó$íûÎÂi[ J]ÌIyYìÚ$œüE4\"ûë\'^¿È,¢ÏÐ7ûFMOÞÀF6ËÍÄxþJïÖve9]ïÐú\rZîòº,@vú\Z\'ŽædBwªf9,_ §³Œ\0Û66ÄJp«QøË#ç.P[Éa`J³³À:uH ºÚR\0\0Ac_Qwèþ·ÌW5ûJsn\nsŠ÷6XÁ[Unè5-\\é!ÿËâž DõU@QRÁÃ>ðý.«ã]r|~7Z®\0Àn×RJ`o3\0@\0á©P\rÇD=à Ý?ä>\0Ð`N°\'u\0¬Ï- Ü\0Â(UºHB=óÄ u¶±*\0\ZYóÜšå0\0 Ñy\0 Ñp\0\0\Z\r\00\0tP|O;ë\0\0\0\0IEND®B`','image/png',2,NOW(),2,NOW(),90); trunk/install/updatev0.61.sql
r60 r62 5 5 6 6 ALTER TABLE tabledefs CHANGE defaultwhereclause defaultwhereclause varchar(255); 7 ALTER TABLE tabledefs CHANGE `id` `id` int(11) NOT NULL auto_increment default '1000'; 7 ALTER TABLE tabledefs CHANGE `id` `id` int(11) NOT NULL auto_increment default '1000'; 8 9 ALTER TABLE tablecolumns CHANGE `format` `format` enum('date','time','currency','boolean','datetime','filelink') default NULL, 8 10 9 11 UPDATE tabledefs SET defaultwhereclause="notes.type='EV' AND notes.createdby = {{$_SESSION['userinfo']['id']}} AND ((notes.startdate = year(notes.startdate)=year(curdate()) and week(notes.startdate)=week(curdate())) OR notes.`repeat`=1)" WHERE id=24; … … 15 17 CREATE TABLE `settings` (`id` int(11) NOT NULL auto_increment, `name` varchar(64) NOT NULL default '',`value` varchar(255) default '', PRIMARY KEY (`id`)) TYPE=MyISAM; 16 18 17 CREATE TABLE `files` (`id` int(11) NOT NULL auto_increment,`name` varchar(128) NOT NULL default '',` accesslevel` int(11) NOT NULL default '0',`servename` varchar(64) NOT NULL default '',`file` longblob,`type` varchar(100) default '',`createdby` int(11) default '0',`creationdate` datetime default '0000-00-00 00:00:00',`modifiedby` int(11) default '0',`modifieddate` timestamp(14) NOT NULL,PRIMARY KEY (`id`)) TYPE=MyISAM;19 CREATE TABLE `files` (`id` int(11) NOT NULL auto_increment,`name` varchar(128) NOT NULL default '',`description` text,`file` longblob,`type` varchar(100) default '',`createdby` int(11) default '0',`creationdate` datetime default '0000-00-00 00:00:00',`modifiedby` int(11) default '0',`modifieddate` timestamp(14) NOT NULL,`accesslevel` int(11) NOT NULL default '0',PRIMARY KEY (`id`)) TYPE=MyISAM; 18 20 19 21 CREATE TABLE `filetorecord` (`id` int(11) NOT NULL auto_increment,`fileid` int(11) NOT NULL default '0',`tabledefid` int(11) NOT NULL default '0',`recordid` int(11) NOT NULL default '0',`createdby` int(11) default '0',`creationdate` datetime default '0000-00-00 00:00:00',`modifiedby` int(11) default '0',`modifieddate` timestamp(14) NOT NULL,PRIMARY KEY (`id`),KEY `therecord` (`recordid`),KEY `thetable` (`tabledefid`),KEY `thefile` (`fileid`)) TYPE=MyISAM; trunk/modules/base/adminsettings.php
r57 r62 77 77 <?PHP field_text("sapplication_name",$_SESSION["application_name"],1,"Application name cannot be blank.","",Array("size"=>"32","maxlength"=>"128")); ?> 78 78 </label> 79 <div class=" small">80 < em>Replace this with your comapny name + BMS (e.g. "Kreotek BMS")</em>79 <div class="notes"> 80 <strong>Example:</strong> Replace this with your comapny name + BMS (e.g. "Kreotek BMS") 81 81 </div> 82 82 <label for="sencryption_seed"> … … 84 84 <?PHP field_text("sencryption_seed",$_SESSION["encryption_seed"],1,"Application name cannot be blank.","",Array("size"=>"32","maxlength"=>"128")); ?> 85 85 </label> 86 <div class="small important"> 87 <em>Changing the encryption seed will void all current passwords. They will need to be reset immediately before logging out.</em> 86 <div class="notes"> 87 <strong>Note:</strong> 88 Changing the encryption seed will void all current passwords. They will need to be reset immediately before logging out. 88 89 </div> 89 90 <label for="srecord_limit"> … … 97 98 </fieldset> 98 99 99 <fieldset>100 <legend>My<span style="text-transform:capitalize;">SQL</span></legend>101 <div class="small important">102 <em>MysSQL settings must be updated manually by editing the settings.php file</em>103 </div>104 <label for="smysql_server">105 server name<br />106 <input size="32" maxlength="128" value="<?php echo htmlQuotes($_SESSION["mysql_server"])?>" readonly class="uneditable"/>107 </label>108 <label for="smysql_database">109 database name<br />110 <input size="32" maxlength="128" value="<?php echo htmlQuotes($_SESSION["mysql_database"])?>" readonly class="uneditable"/>111 </label>112 <label for="smysql_user">113 mysql username<br />114 <input size="32" maxlength="128" value="<?php echo htmlQuotes($_SESSION["mysql_user"])?>" readonly class="uneditable"/>115 </label>116 <label for="smysql_userpass">117 mysql user password<br />118 <input size="32" maxlength="128" value="<?php echo htmlQuotes($_SESSION["mysql_userpass"])?>" readonly class="uneditable"/>119 </label>120 </fieldset>121 122 100 <fieldset> 123 101 <legend>company</legend> … … 150 128 <input id="printedlogo" name="printedlogo" type="file" size="40" accept="image/x-png" /> 151 129 </label> 152 <div class="small important"> 153 This graphic is used on some reports. On PDF reports, it prints in a mximum of 1.75" x 1.75". PNG format. 130 <div class="notes"> 131 <strong>Note:</strong> This graphic is used on some reports. On PDF reports, it prints in a mximum of 1.75" x 1.75". PNG format. 132 PNG must be gray scale on at most 8 bits (256 levels), indexed color, or true color (24 bits). PNG cannot 133 contain an alpha channel, or interlacing. 154 134 </div> 155 135 <label for="sstylesheet"> trunk/modules/base/files_addedit.php
r60 r62 40 40 include("../../include/fields.php"); 41 41 42 include("include/files_addedit_include.php"); 43 44 $pageTitle="File"; 42 if(!isset($_GET["backurl"])){ 43 include("include/files_addedit_include.php"); 44 $pageTitle="File"; 45 } else { 46 include("include/attachments_addedit_include.php"); 47 $pageTitle="File Attachment"; 48 } 49 50 function getAttachments($id){ 51 global $dblink; 52 $querystatement="SELECT tabledefs.displayname, attachments.recordid, attachments.creationdate, tabledefs.editfile 53 FROM attachments INNER JOIN tabledefs ON attachments.tabledefid=tabledefs.id 54 WHERE fileid=".$id; 55 $queryresult=mysql_query($querystatement,$dblink); 56 if(!$queryresult) reportError(300,"Error Retrieving Attachments: ".mysql_error($dblink)." -- ".$querystatement); 57 return $queryresult; 58 } 45 59 46 60 ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> … … 50 64 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 51 65 <link href="<?php echo $_SESSION["app_path"] ?>common/stylesheet/<?php echo $_SESSION["stylesheet"] ?>/base.css" rel="stylesheet" type="text/css"> 52 66 <script language="JavaScript" src="../../common/javascript/common.js"></script> 53 67 <script language="JavaScript" src="../../common/javascript/fields.js"></script> 68 <script language="JavaScript" src="../../common/javascript/autofill.js"></script> 69 <script language="JavaScript" src="../base/javascript/file.js"></script> 54 70 </head> 55 71 <body><?php include("../../menu.php")?> … … 71 87 <input id="id" name="id" type="text" value="<?php echo $therecord["id"]; ?>" size="5" maxlength="5" readonly="true" class="uneditable" style="width:99%" /> 72 88 </label> 73 <label for="accesslevel" >89 <label for="accesslevel" id="accesslevellabel"> 74 90 minimum access level<br /> 75 91 <?php … … 92 108 </fieldset> 93 109 <fieldset> 94 <legend>names</legend> 95 <label for="name" class="important"> 96 name<br /> 97 <?PHP field_text("name",$therecord["name"],1,"Name cannot be blank.","",Array("size"=>"32","maxlength"=>"64","style"=>"width:98%","class"=>"important","tabindex"=>"5")); ?> 110 <legend>file</legend> 111 <?php if(isset($_GET["tabledefid"])){?> 112 <input id="attachmentid" name="attachmentid" type="hidden" value="<?php echo $therecord["attachmentid"]?>"> 113 <input id="tabledefid" name="tabledefid" type="hidden" value="<?php echo (integer) $_GET["tabledefid"]?>"> 114 <input id="recordid" name="recordid" type="hidden" value="<?php echo (integer) $_GET["refid"]?>"> 115 <?php }?> 116 117 <?php if($therecord["id"]) {?> 118 <button type="button" class="Buttons" onClick="document.location='../../servefile.php?i=<?php echo $therecord["id"]?>'">View/Download <?php echo $therecord["name"] ?></button> 119 <label for="name" class="important"> 120 name<br /> 121 <?PHP field_text("name",$therecord["name"],1,"Name cannot be blank.","",Array("size"=>"64","maxlength"=>"128","style"=>"","class"=>"important","tabindex"=>"5")); ?> 122 </label> 123 <div class="small"><em>If the file name does <strong>not</strong> include an extension your browser may not be able to download/view the file correctly.</em></div> 124 <label for="type"> 125 type <em>(MIME)</em><br /> 126 <input type="text" id="type" name="type" value="<?php echo htmlQuotes($therecord["type"])?>" size="64" maxlength="100" readonly="true" class="uneditable" style="" /> 127 </label> 128 <label for="upload"> 129 replace file<br /> 130 <input id="upload" name="upload" type="file" size="64" tabindex="260" /> 131 </label> 132 <?php } else {?> 133 <?php if(isset($_GET["tabledefid"])){?> 134 <div> 135 <label for="newfile" style="display:inline"><input class="radiochecks" type="radio" name="newexisting" id="newfile" value="new" checked onClick="switchFile()"> new file</label> 136 <label for="existingfile" style="display:inline"><input type="radio" class="radiochecks" name="newexisting" id="existingfile" value="existing" onClick="switchFile()"> existing file</label> 137 </div> 138 <label for="fileid-ds" id="fileidlabel" style="display:none;"> 139 existing file<br /> 140 <?PHP autofill("fileid","",26,"files.id","files.name","if(length(files.description)>20,concat(left(files.description,17),\"...\"),files.description)","files.id!=1 AND files.accesslevel<=".$_SESSION["userinfo"]["accesslevel"],Array("size"=>"40","maxlength"=>"128","style"=>"",false)) ?> 141 </label> 142 <label for="upload" id="uploadlabel" style="display:block;"> 143 upload new file<br /> 144 <input id="upload" name="upload" type="file" size="64" tabindex="260" /> 145 </label> 146 <?php } else {?> 147 <label for="upload"> 148 upload file<br /> 149 <input id="upload" name="upload" type="file" size="64" tabindex="260" /> 150 </label> 151 <?php } ?> 152 <?php } ?> 153 <label for="servename" id="descriptionlabel"> 154 description<br /> 155 <textarea name="description" cols="45" rows="4" id="content" style="width:98%"><?PHP echo $therecord["description"]?></textarea> 98 156 </label> 99 <label for="servename" class="important">100 serve name<br />101 <?PHP field_text("servename",$therecord["servename"],1,"Serve name cannot be blank.","",Array("size"=>"40","maxlength"=>"64","style"=>"","class"=>"important","tabindex"=>"5")); ?>102 </label>103 <div class="small" style="padding-top:6px;padding-bottom:6px;"><em>104 Serve name is the file name, including extension that will be used when the file is sent through the web server to the client.105 If the extension does not match the type (mime file type) the client browser may misinterpret the file.106 </em></div>107 157 </fieldset> 108 <fieldset style="clear:both"> 109 <legend>file</legend> 110 <?php if(!$therecord["nofile"]){?> 111 <label for="type"> 112 type <em>(MIME)</em><br /> 113 <input type="text" id="type" name="type" value="<?php echo htmlQuotes($therecord["type"])?>" size="40" maxlength="100" readonly="true" class="uneditable" style="" /> 114 </label> 115 <div><button type="button" class="Buttons" onClick="document.location='../../servefile.php?i=<?php echo $therecord["id"]?>'">view file</button></div> 116 <?php } ?> 117 <label for="upload"> 118 <?php if(!$therecord["nofile"]) echo "change file"; else echo "upload file"?><br /> 119 <input id="upload" name="upload" type="file" size="40" tabindex="260" /> 120 </label> 121 122 </fieldset> 158 <?php 159 if($therecord["id"]) { 160 $attchmentsquery=getAttachments($therecord["id"]); 161 if(mysql_num_rows($attchmentsquery)){ 162 ?> 163 <fieldset style="margin-right:185px;"> 164 <legend>attachments</legend> 165 <div style="" class="smallQueryTableHolder"> 166 <table border="0" cellpadding="0" cellspacing="0" class="smallQueryTable"> 167 <tr> 168 <th align="left">table</th> 169 <th align="left" nowrap>ID</th> 170 <th align="right" width="99%">attached</th> 171 <th align="left" nowrap> </th> 172 </tr> 173 <?php 174 while($attachmentrecord=mysql_fetch_array($attchmentsquery)){ 175 ?> 176 <TR> 177 <TD nowrap><?php echo $attachmentrecord["displayname"] ?></TD> 178 <TD><?php echo $attachmentrecord["recordid"] ?></TD> 179 <TD align="right"><?php echo formatDateTime($attachmentrecord["creationdate"]) ?></TD> 180 <TD> 181 <a href="<?php echo $_SESSION["app_path"].$attachmentrecord["editfile"]."?id=".$attachmentrecord["recordid"] ?>"> 182 <img src="<?php echo $_SESSION["app_path"]?>common/stylesheet/<?php echo $_SESSION["stylesheet"] ?>/button-edit.png" align="absmiddle" alt="edit" width="16" height="16" border="0" /> 183 </a> 184 </TD> 185 </TR> 186 <?php 187 } ?></table></div></fieldset><?php 188 } 189 }?> 190 123 191 <?php include("../../include/createmodifiedby.php"); ?> 124 192 </div> trunk/modules/base/include/adminsettings_include.php
r60 r62 85 85 if(!$queryresult) reportError(300,"Error Uploading Graphic File"); 86 86 } 87 }88 87 89 88 return true; trunk/modules/base/include/files_addedit_include.php
r60 r62 50 50 51 51 $querystatement="SELECT 52 id,name, servename,type,accesslevel,ISNULL(file) as nofile,52 id,name,description,type,accesslevel, 53 53 54 54 createdby, creationdate, … … 69 69 70 70 $therecord["name"]=""; 71 $therecord[" servename"]="";71 $therecord["description"]=""; 72 72 $therecord["type"]=""; 73 73 $therecord["accesslevel"]=0; 74 $therecord["nofile"]=1;75 74 76 75 $therecord["createdby"]=$_SESSION["userinfo"]["id"]; … … 89 88 90 89 $querystatement="UPDATE files SET "; 91 92 $ querystatement.="name=\"".$variables["name"]."\", ";93 $querystatement.=" servename=\"".$variables["servename"]."\", ";90 91 $name=$variables["name"]; 92 $querystatement.="description=\"".$variables["description"]."\", "; 94 93 $querystatement.="accesslevel=".$variables["accesslevel"].", "; 95 94 if($_FILES['upload']["name"]){ 95 $name=$_FILES['upload']["name"]; 96 96 if (function_exists('file_get_contents')) { 97 97 $file = addslashes(file_get_contents($_FILES['upload']['tmp_name'])); … … 103 103 $querystatement.="file=\"".$file."\", "; 104 104 } 105 $querystatement.="name=\"".$name."\", "; 105 106 106 107 //==== Almost all records should have this ========= … … 129 130 $querystatement="INSERT INTO files "; 130 131 131 $querystatement.="(name, servename,accesslevel,type,file,132 $querystatement.="(name,description,accesslevel,type,file, 132 133 createdby,creationdate,modifiedby) VALUES ("; 133 134 134 $querystatement.="\"".$ variables["name"]."\", ";135 $querystatement.="\"".$variables[" servename"]."\", ";135 $querystatement.="\"".$_FILES['upload']["name"]."\", "; 136 $querystatement.="\"".$variables["description"]."\", "; 136 137 $querystatement.=$variables["accesslevel"].", "; 137 138 $querystatement.="\"".$_FILES['upload']['type']."\", "; trunk/modules/base/include/files_search_functions.php
r58 r62 44 44 //delete reports 45 45 function delete_record($theids){ 46 //passed variable is array of user ids to be revoked 47 $whereclause=buildWhereClause($theids,"reports.id"); 46 global $dblink; 48 47 49 $querystatement = "DELETE FROM reports WHERE ".$whereclause.";"; 48 $whereclause=buildWhereClause($theids,"files.id"); 49 $attachmentwhereclause=buildWhereClause($theids,"attachments.fileid"); 50 51 $querystatement = "DELETE FROM attachments WHERE ".$attachmentwhereclause." AND attachments.fileid!=1;"; 52 $queryresult = mysql_query($querystatement,$dblink); 53 if (!$queryresult) reportError(300,"Couldn't Delete: ".mysql_error($dblink)." -- ".$querystatement); 54 55 $querystatement = "DELETE FROM files WHERE ".$whereclause." AND files.id!=1;"; 50 56 $queryresult = mysql_query($querystatement,$dblink); 51 57 if (!$queryresult) reportError(300,"Couldn't Delete: ".mysql_error($dblink)." -- ".$querystatement); … … 61 67 $has_header=true; 62 68 function display_header(){ 63 admin_tabs("Tables"); 64 echo "<table width='100%' cellspacing=0 cellpadding=0 class='bodyline' style='border-bottom:0px;margin-bottom:0px;background-image:none;padding-top:3px;-moz-border-radius-bottomleft:0px;-moz-border-radius-bottomright:0px;'><tr><td>"; 65 admin_table_tabs("Reports"); 66 echo "</td></tr></table>"; 69 admin_tabs("Files"); 67 70 }; 68 71 ?> trunk/modules/base/include/reports_search_functions.php
r51 r62 44 44 //delete reports 45 45 function delete_record($theids){ 46 //passed variable is array of user ids to be revoked 46 global $dblink;