Changeset 2496 for trunk/include/ws_functions.inc.php
- Timestamp:
- Sep 4, 2008, 2:57:55 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/ws_functions.inc.php
r2463 r2496 919 919 { 920 920 global $conf; 921 921 if (!is_admin() || is_adviser() ) 922 { 923 return new PwgError(401, 'Access denied'); 924 } 925 922 926 // name 923 927 // category_id … … 926 930 // thumbnail_content 927 931 // thumbnail_sum 928 932 929 933 // $fh_log = fopen('/tmp/php.log', 'w'); 930 934 // fwrite($fh_log, time()."\n"); … … 935 939 list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();')); 936 940 list($year, $month, $day) = preg_split('/[^\d]/', $dbnow, 4); 937 941 938 942 $upload_dir = sprintf( 939 943 PHPWG_ROOT_PATH.'upload/%s/%s/%s', … … 943 947 ); 944 948 945 fwrite($fh_log, $upload_dir."\n");946 949 //fwrite($fh_log, $upload_dir."\n"); 950 947 951 if (!is_dir($upload_dir)) { 948 952 umask(0000); … … 955 959 956 960 $filename_wo_ext = $date_string.'-'.$random_string; 957 961 958 962 $file_path = $upload_dir.'/'.$filename_wo_ext.'.jpg'; 959 963 $fh_file = fopen($file_path, 'w'); … … 968 972 mkdir($thumbnail_dir, 0777); 969 973 } 970 974 971 975 $thumbnail_path = sprintf( 972 976 '%s/%s%s.%s', … … 1012 1016 array($insert) 1013 1017 ); 1014 1018 1015 1019 // fclose($fh_log); 1016 1020 }
Note: See TracChangeset
for help on using the changeset viewer.