Cheetah
ChPhotosUploader.php
Go to the documentation of this file.
1 <?php
2 
8 //require_once(CH_DIRECTORY_PATH_MODULES . 'cheetah/photos/classes/ChPhotosModule.php' );
9 
10 ch_import('ChWsbFilesUploader');
11 ch_import('ChWsbCategories');
12 ch_import('ChWsbAlbums');
13 ch_import('ChWsbModule');
14 
17 $sModule = "photo";
20 require_once($sModulesPath . $sModule . '/inc/header.inc.php');
21 require_once($sModulesPath . $sModule . '/inc/constants.inc.php');
22 require_once($sModulesPath . $sModule . '/inc/functions.inc.php');
23 
25 {
26  // constructor
27  function __construct()
28  {
29  parent::__construct('Photo');
30 
31  $this->oModule = ChWsbModule::getInstance('ChPhotosModule');
32  $this->sWorkingFile = CH_WSB_URL_ROOT . $this->oModule->_oConfig->getBaseUri() . 'albums/my/add_objects';
33 
34  $this->sAcceptMimeType = 'image/*';
35  $this->bImageAutoRotate = 1;
36  }
37 
38  function getEmbedFormFile()
39  {
40  $sKey = $this->oModule->_oConfig->getGlParam('flickr_photo_api');
41  return ($sKey != '') ? $this->_getEmbedFormFile() : MsgBox(_t('_ch_photos_flickr_key_not_exist'));
42  }
43 
44  function getRecordFormFile($aExtras)
45  {
46  $sCustomRecorderObject = getApplicationContent('photo', 'shooter', array('id' => $this->_getAuthorId(), 'password' => $this->_getAuthorPassword(), 'extra' => ''), true);
47  return $this->_getRecordFormFile($sCustomRecorderObject, $aExtras);
48  }
49 
50  function GenSendFileInfoForm($iFileID, $aDefaultValues = array())
51  {
52  $sPhotoUrl = "";
53  if(isset($aDefaultValues['image']))
54  $sPhotoUrl = $aDefaultValues['image'];
55  else if(!empty($iFileID)) {
56  $aPhotoInfo = ChWsbService::call('photos', 'get_photo_array', array($iFileID), 'Search');
57  $sPhotoUrl = $aPhotoInfo['file'];
58  }
59  $sProtoEl = '<img src="' . $sPhotoUrl . '" />';
60 
61  $aPossibleImage = array();
62  $aPossibleImage['preview_image'] = array(
63  'type' => 'custom',
64  'content' => $sProtoEl,
65  'caption' => _t('_ch_photos_preview'),
66  );
67 
68  return $this->_GenSendFileInfoForm($iFileID, $aDefaultValues, $aPossibleImage, array());
69  }
70 
72  {
73  $sResult = $this->_recordPhoto();
74  return ($sResult!='') ? $this->GenJquieryInjection() . $sResult : '';
75  }
76 
78  {
79  $sErrorReturn = '<script type="text/javascript">parent.' . $this->_sJsPostObject . '.showErrorMsg("photo_embed_failed_message");parent.' . $this->_sJsPostObject . '.resetEmbed();</script>';
80 
81  $sEmbed = process_db_input(ch_get('embed'));
82 
83  $aMatches = array();
84  if(!preg_match("/^https?:\/\/(www.)?flickr.com\/photos\/([0-9A-Za-z_@-]+)\/([0-9]{10}|[0-9]{11})\/.*$/i", $sEmbed, $aMatches))
85  return $sErrorReturn;
86 
87  if(empty($aMatches[3]))
88  return $sErrorReturn;
89 
90  $sPhotoId = $aMatches[3];
91 
92  $sApiKey = $this->oModule->_oConfig->getGlParam('flickr_photo_api');
93  $sPhotoUrl = str_replace("#api_key#", $sApiKey, FLICKR_PHOTO_RSS);
94  $sPhotoUrl = str_replace("#photo#", $sPhotoId, $sPhotoUrl);
95  $sPhotoDataOriginal = $this->embedReadUrl($sPhotoUrl);
96 
97  $aResult = $this->embedGetTagAttributes($sPhotoDataOriginal, "rsp");
98  if($aResult["stat"] == "fail") {
99  $aResult = $this->embedGetTagAttributes($sPhotoDataOriginal, "err");
100  $sNewError = $aResult["msg"];
101  $sErrorReturn = '<script type="text/javascript">parent.' . $this->_sJsPostObject . '.changeErrorMsgBoxMsg("photo_embed_failed_message", "'.$sNewError.'"); parent.' . $this->_sJsPostObject . '.showErrorMsg("photo_embed_failed_message");parent.' . $this->_sJsPostObject . '.resetEmbed();</script>';
102  return $sErrorReturn;
103  }
104 
105  $sPhotoData = $this->embedGetTagContents($sPhotoDataOriginal, "photo");
106  if(empty($sPhotoData)) return $sErrorReturn;
107 
108  $sTitle = $this->embedGetTagContents($sPhotoData, "title");
109  $sDesc = $this->embedGetTagContents($sPhotoData, "description");
110  $sTags = strip_tags($this->embedGetTagContents($sPhotoData, "tags"));
111  $sTags = trim(str_replace("\n", " ", $sTags));
112  $sTags = trim(str_replace("\t", "", $sTags));
113 
114  $aPhoto = $this->embedGetTagAttributes($sPhotoDataOriginal, "photo");
115  $sImage = str_replace("#id#", $sPhotoId, FLICKR_PHOTO_URL);
116  $sImage = str_replace("#farm#", $aPhoto['farm'], $sImage);
117  $sImage = str_replace("#server#", $aPhoto['server'], $sImage);
118  $sExt = "jpg";
119  $sMode = "";
120  if(isset($aPhoto['originalsecret'])) {
121  $aPhoto['secret'] = $aPhoto['originalsecret'];
122  $sExt = $aPhoto['originalformat'];
123  $sMode = "_o";
124  }
125  $sImage = str_replace("#secret#", $aPhoto['secret'], $sImage);
126  $sImage = str_replace("#mode#", $sMode, $sImage);
127  $sImage = str_replace("#ext#", $sExt, $sImage);
128  if(empty($sTitle)) return $sErrorReturn;
129 
130  $sResult = $this->_embedPhoto($sPhotoId, $sTitle, $sDesc, $sTags, $sImage);
131  return ($sResult!='') ? $this->GenJquieryInjection() . $sResult : '';
132  }
133 
135  {
136  $iAuthorId = $this->_getAuthorId();
137 
138  $sType = process_db_input($_POST['type']);
139  $iFileId = (int)$_POST['file_id'];
140  switch($sType) {
141  case 'embed':
142  case 'record':
144  $iPhotoId = (int)$this->performPhotoUpload($sFilesPath . $iAuthorId . IMAGE_EXTENSION, array(), false, false);
145  removeFiles($iAuthorId);
146  break;
147 
148  case 'upload':
149  default:
150  $iPhotoId = $iFileId;
151  break;
152  }
153 
154  if($iPhotoId && $iAuthorId) {
155  $sTitle = $_POST['title'];
156  $sTags = $_POST['tags'];
157  if($sType == 'embed' && !empty($sTags) && strpos($sTags, CH_WSB_TAGS_DIVIDER) === false)
158  $sTags = str_replace(' ', CH_WSB_TAGS_DIVIDER, $sTags);
159  $sDescription = $_POST['description'];
160 
161  $aCategories = array();
162  foreach($_POST['Categories'] as $sKey => $sVal)
163  if($sVal != '')
164  $aCategories[] = $sVal;
165  $sCategories = implode(CATEGORIES_DIVIDER, $aCategories);
166 
167  if($this->initFile($iPhotoId, $sTitle, $sCategories, $sTags, $sDescription)) {
168  $this->alertAdd($iPhotoId);
169 
170  return '<script type="text/javascript">parent.' . $this->_sJsPostObject . '.onSuccessSendingFileInfo("' . $iFileId . '");</script>';
171  }
172  }
173 
174  return '<script type="text/javascript">parent.' . $this->_sJsPostObject . '.showErrorMsg("photo_failed_message");</script>';
175  }
176 
177  function _embedPhoto($sPhotoId, $sTitle, $sDesc, $sTags, $sImage)
178  {
179  $sAuthorCheck = $this->checkAuthorBeforeAdd();
180  if(empty($sAuthorCheck)) {
181  $sEmbedThumbUrl = photo_getEmbedThumbnail($this->_getAuthorId(), $sImage);
182  if($sEmbedThumbUrl) {
183  $aDefault = array('photo' => $sPhotoId, 'title' => $sTitle, 'description' => $sDesc, 'tags' => $sTags, 'image' => $sEmbedThumbUrl, 'type' => "embed");
184  return $this->GenSendFileInfoForm(1, $aDefault);
185  } else
186  return $this->getFileAddError();
187  } else
188  return $sAuthorCheck;
189  }
190 
191  function servicePerformPhotoUpload ($sTmpFilename, $aFileInfo, $isUpdateThumb, $iAuthorId = 0)
192  {
193  if (!$iAuthorId)
194  $iAuthorId = $this->_iOwnerId;
195  return $this->performPhotoUpload($sTmpFilename, $aFileInfo, $isUpdateThumb, false, 0, $iAuthorId);
196  }
197 
198  function servicePerformPhotoReplace($sTmpFilename, $aFileInfo, $isUpdateThumb, $iPhotoID)
199  {
200  return $this->performPhotoUpload($sTmpFilename, $aFileInfo, $isUpdateThumb, false, $iPhotoID);
201  }
202 
208  function performUpload ($sFilePath, $sRealFilename = '', $aInfo = array(), $isMoveUploadedFile = true, $aExtraParams = array())
209  {
210  $iOwner = $this->_getAuthorId();
211  if ($this->_iOwnerId)
212  $iOwner = $this->oModule->_iProfileId = $this->_iOwnerId;
213 
214  if (!$sRealFilename)
215  $sRealFilename = pathinfo($sFilePath, PATHINFO_BASENAME);
216 
217  // basic checking before upload
218 
219  if ($this->checkAuthorBeforeAdd())
220  return array('error' => _t('_LOGIN_REQUIRED_AE1'));
221 
222  if (!$this->oModule->_oConfig->checkAllowedExtsByFilename($sRealFilename))
223  return array('error' => _t('_sys_txt_wrong_file_extension'));
224 
225  if (!$this->oModule->isAllowedAdd())
226  return array('error' => _t('_Access denied'));
227 
228  // perform upload
229 
230  $this->sTempFilename = pathinfo($sRealFilename, PATHINFO_FILENAME);
231  if (!($iMID = $this->performPhotoUpload($sFilePath, $aInfo, false, $isMoveUploadedFile)))
232  return array('error' => _t('_sys_txt_upload_failed'));
233 
234  return array('id' => $iMID);
235  }
236 
238  {
239  return array(
240  'maxWidth' => $this->oModule->_oConfig->getGlParam('client_width'),
241  'maxHeight' => $this->oModule->_oConfig->getGlParam('client_height'),
242  'quality' => 0.86, // jpeg quality
243  );
244  }
245 
246  function _recordPhoto()
247  {
248  $sAuthorCheck = $this->checkAuthorBeforeAdd();
249  if(empty($sAuthorCheck)) {
251  $sRecordThumbUrl = photo_getRecordThumbnail($this->_getAuthorId());
252  if($sRecordThumbUrl) {
253  $aDefault = array('image' => $sRecordThumbUrl, 'type' => "record");
254  return $this->GenSendFileInfoForm(1, $aDefault);
255  } else
256  return $this->getFileAddError();
257  } else
258  return $sAuthorCheck;
259  }
260 
261  function initFile($iMedID, $sTitle, $sCategories = '', $sTags = '', $sDesc = '', $aCustom = array())
262  {
263  $aCustom['Approved'] = getParam('ch_photos_activation') == 'on' ? 'approved' : 'pending';
264  return parent::initFile($iMedID, $sTitle, $sCategories, $sTags, $sDesc, $aCustom);
265  }
266 
267  // simple upload
268  function performPhotoUpload($sTmpFile, $aFileInfo, $bAutoAssign2Profile = false, $isMoveUploadedFile = true, $iChangingPhotoID = 0, $iAuthorId = 0)
269  {
270  global $dir;
271 
272  $iLastID = -1;
273 
274  if (!$iAuthorId)
275  $iAuthorId = $this->_iOwnerId;
276  $this->oModule = ChWsbModule::getInstance('ChPhotosModule');
277  // checker for flash uploader
278  if (!$this->oModule->_iProfileId)
279  $this->oModule->_iProfileId = $this->_iOwnerId;
280  if (!$iAuthorId || file_exists($sTmpFile) == false || !$this->oModule->isAllowedAdd(FALSE, FALSE, FALSE))
281  return false;
282 
283  $sMediaDir = $this->oModule->_oConfig->getFilesPath();
284 
285  if (!$sMediaDir) {
286  @unlink($sTmpFile);
287  return false;
288  }
289 
290  $sTempFileName = $sMediaDir . $iAuthorId . '_temp';
291  @unlink($sTempFileName);
292 
293  if (($isMoveUploadedFile && is_uploaded_file($sTmpFile)) || !$isMoveUploadedFile) {
294 
295  if ($isMoveUploadedFile) {
296  move_uploaded_file($sTmpFile, $sTempFileName);
297  @unlink($sTmpFile);
298  } else {
299  $sTempFileName = $sTmpFile;
300  }
301 
302  @chmod($sTempFileName, 0644);
303  if(file_exists($sTempFileName) && filesize($sTempFileName)>0) {
304  $aSize = getimagesize($sTempFileName);
305  if (!$aSize) {
306  @unlink($sTempFileName);
307  return false;
308  }
309 
310  switch($aSize[2]) {
311  case IMAGETYPE_JPEG: $sExtension = '.jpg'; break;
312  case IMAGETYPE_GIF: $sExtension = '.gif'; break;
313  case IMAGETYPE_PNG: $sExtension = '.png'; break;
314  default:
315  @unlink($sTempFileName);
316  return false;
317  }
318 
319  $sStatus = 'processing';
320  $iImgWidth = (int)$aSize[0];
321  $iImgHeight = (int)$aSize[1];
322  $sDimension = $iImgWidth.'x'.$iImgHeight;
323  $sFileSize = sprintf("%u", filesize($sTempFileName) / 1024);
324 
325  if ($iChangingPhotoID==0) {
326  if (is_array($aFileInfo) && count($aFileInfo)>0) {
327  $aFileInfo['dimension'] = $sDimension;
328  $iLastID = $this->insertSharedMediaToDb($sExtension, $aFileInfo, $iAuthorId);
329  } else {
330  $sExtDb = trim($sExtension, '.');
331  $sMedUri = $sCurTime = time();
332 
333  $sTitleDescTemp = ($this->sTempFilename != '') ? $this->sTempFilename : $iAuthorId . '_temp';
334  if (getParam('ch_photos_activation') == 'on') {
335  $bAutoActivate = true;
336  $sStatus = 'approved';
337  } else {
338  $bAutoActivate = false;
339  $sStatus = 'pending';
340  }
341 
342  $sAlbum = $_POST['extra_param_album'];
343  $aAlbumParams = isset($_POST['extra_param_albumPrivacy']) ? array('privacy' => (int)$_POST['extra_param_albumPrivacy']) : array();
344 
345  $iLastID = $this->oModule->_oDb->insertData(array('medProfId'=>$iAuthorId, 'medExt'=>$sExtDb, 'medTitle'=>$sTitleDescTemp, 'medUri'=>genRndPwd(8, false).$sMedUri, 'medDesc'=>$sTitleDescTemp, 'medTags'=>'', 'Categories'=>PROFILE_PHOTO_CATEGORY, 'medSize'=>$sDimension, 'Approved'=>$sStatus, 'medDate'=>$sCurTime));
346  $this->addObjectToAlbum($this->oModule->oAlbums, $sAlbum, $iLastID, $bAutoActivate, $iAuthorId, $aAlbumParams);
347  $this->oModule->isAllowedAdd(true, true);
348  }
349  } else {
350  $iLastID = $iChangingPhotoID;
351  $this->updateMediaShared($iLastID, $aFileInfo);
352  }
353 
354  $sFunc = ($isMoveUploadedFile) ? 'rename' : 'copy';
355  if (! $sFunc($sTempFileName, $sMediaDir . $iLastID . $sExtension)) {
356  @unlink($sTempFileName);
357  return false;
358  }
359 
360  $this->sSendFileInfoFormCaption = $iLastID . $sExtension . " ({$sDimension}) ({$sFileSize}kb)";
361 
362  $sFile = $sMediaDir . $iLastID . $sExtension;
363 
364  // watermark postprocessing
365  if (getParam('enable_watermark') == 'on') {
366  $iTransparent = getParam('transparent1');
367  $sWaterMark = $dir['profileImage'] . getParam('Water_Mark');
368 
369  if (strlen(getParam('Water_Mark')) && file_exists($sWaterMark))
370  applyWatermark($sFile, $sFile, $sWaterMark, $iTransparent);
371  }
372 
373  // generate present pics
374  foreach ($this->oModule->_oConfig->aFilesConfig as $sKey => $aValue) {
375  if (!isset($aValue['size_def']))
376  continue;
377  $iWidth = (int)$this->oModule->_oConfig->getGlParam($sKey . '_width');
378  $iHeight = (int)$this->oModule->_oConfig->getGlParam($sKey . '_height');
379  if ($iWidth == 0)
380  $iWidth = $aValue['size_def'];
381  if ($iHeight == 0)
382  $iHeight = $aValue['size_def'];
383  $sNewFilePath = $sMediaDir . $iLastID . $aValue['postfix'];
384  $iRes = imageResize($sFile, $sNewFilePath, $iWidth, $iHeight, true, isset($aValue['square']) && $aValue['square']);
385  if ($iRes != 0)
386  return false; //resizing was failed
387  @chmod($sNewFilePath, 0644);
388  }
389 
390  $aOwnerInfo = getProfileInfo($iAuthorId);
391  $bAutoAssign2Profile = ($aOwnerInfo['Avatar']==0) ? true : $bAutoAssign2Profile;
392  if ($bAutoAssign2Profile && $iLastID > 0) {
393  $this->setPrimarySharedPhoto($iLastID, $iAuthorId);
394  createUserDataFile($iAuthorId);
395  }
396 
397  if (is_array($aFileInfo) && count($aFileInfo) > 0)
398  $this->alertAdd($iLastID, true);
399  }
400  }
401 
402  return $iLastID;
403  }
404 
405  function setPrimarySharedPhoto($iPhotoID, $iAuthorId = 0)
406  {
407 
408  }
409 
410  function updateMediaShared($iMediaID, $aFileInfo)
411  {
412  $sMedUri = uriGenerate($aFileInfo['medTitle'], $this->oModule->_oDb->sFileTable, $this->oModule->_oDb->aFileFields['medUri']);
413  return $this->oModule->_oDb->updateData($iMediaID, array('medTitle' => $aFileInfo['medTitle'], 'medUri' => $sMedUri, 'medDesc' => $aFileInfo['medDesc'], 'medDate' => time()));
414  }
415 }
process_db_input
process_db_input($sText, $iStripTags=0)
Definition: utils.inc.php:256
ChPhotosUploader\serviceAcceptEmbedFile
serviceAcceptEmbedFile()
Definition: ChPhotosUploader.php:77
ChWsbFilesUploader
Definition: ChWsbFilesUploader.php:13
ChWsbFilesUploader\addObjectToAlbum
addObjectToAlbum(&$oAlbums, $sAlbumUri, $iObjId, $bUpdateCounter=true, $iAuthorId=0, $aAlbumParams=array())
Definition: ChWsbFilesUploader.php:833
ChPhotosUploader\servicePerformPhotoReplace
servicePerformPhotoReplace($sTmpFilename, $aFileInfo, $isUpdateThumb, $iPhotoID)
Definition: ChPhotosUploader.php:198
$sMode
else $sMode
Definition: antispam.php:362
ChPhotosUploader\serviceAcceptFileInfo
serviceAcceptFileInfo()
Definition: ChPhotosUploader.php:134
$sFilesUrl
global $sFilesUrl
Definition: ChPhotosUploader.php:19
MsgBox
MsgBox($sText, $iTimer=0)
Definition: design.inc.php:175
ChWsbModule\getInstance
static getInstance($sClassName)
Definition: ChWsbModule.php:89
ChWsbFilesUploader\_getRecordFormFile
_getRecordFormFile($sCustomRecorderObject='', $aExtras=array())
Definition: ChWsbFilesUploader.php:273
ChWsbFilesUploader\insertSharedMediaToDb
insertSharedMediaToDb($sExt, $aFileInfo, $iAuthorId=0, $aExtraData=array())
Definition: ChWsbFilesUploader.php:1040
uriGenerate
uriGenerate($s, $sTable, $sField, $iMaxLen=255)
Definition: utils.inc.php:900
$sResult
$sResult
Definition: advanced_settings.php:26
ChWsbFilesUploader\checkAuthorBeforeAdd
checkAuthorBeforeAdd()
Definition: ChWsbFilesUploader.php:395
CH_WSB_TAGS_DIVIDER
const CH_WSB_TAGS_DIVIDER
Definition: ChWsbTags.php:12
ChWsbFilesUploader\getFileAddError
getFileAddError($sMessage='')
Definition: ChWsbFilesUploader.php:1008
ChPhotosUploader\serviceAcceptRecordFile
serviceAcceptRecordFile()
Definition: ChPhotosUploader.php:71
ChPhotosUploader\getRecordFormFile
getRecordFormFile($aExtras)
Definition: ChPhotosUploader.php:44
ch_import
ch_import($sClassName, $aModule=array())
Definition: utils.inc.php:1218
$aResult
$aResult
Definition: index.php:19
ChWsbFilesUploader\embedGetTagContents
embedGetTagContents($sData, $sTag)
Definition: ChWsbFilesUploader.php:341
ch_get
ch_get($sName)
Definition: utils.inc.php:1664
ChWsbFilesUploader\embedReadUrl
embedReadUrl($sUrl)
Definition: ChWsbFilesUploader.php:336
php
ChPhotosUploader
Definition: ChPhotosUploader.php:25
photo_getRecordThumbnail
photo_getRecordThumbnail($sUserId)
Definition: functions.inc.php:32
PROFILE_PHOTO_CATEGORY
const PROFILE_PHOTO_CATEGORY
Definition: ChPhotosModule.php:10
removeFiles
removeFiles($sId)
Definition: functions.inc.php:8
$sExt
$sExt
Definition: get_file.php:14
initFile
initFile($sId, $sTitle, $sCategory, $sTags, $sDesc)
Definition: functions.inc.php:79
ChPhotosUploader\setPrimarySharedPhoto
setPrimarySharedPhoto($iPhotoID, $iAuthorId=0)
Definition: ChPhotosUploader.php:405
$sModulesPath
global $sModulesPath
Definition: ChPhotosUploader.php:15
ChPhotosUploader\updateMediaShared
updateMediaShared($iMediaID, $aFileInfo)
Definition: ChPhotosUploader.php:410
CATEGORIES_DIVIDER
const CATEGORIES_DIVIDER
Definition: ChWsbCategories.php:10
$sModule
$sModule
Definition: ChPhotosUploader.php:17
ChPhotosUploader\_embedPhoto
_embedPhoto($sPhotoId, $sTitle, $sDesc, $sTags, $sImage)
Definition: ChPhotosUploader.php:177
ChWsbFilesUploader\embedGetTagAttributes
embedGetTagAttributes($sData, $sTag, $sAttribute="")
Definition: ChWsbFilesUploader.php:360
$aInfo
$aInfo
Definition: constants.inc.php:21
$sFilesPath
global $sFilesPath
Definition: ChPhotosUploader.php:18
photo_getEmbedThumbnail
photo_getEmbedThumbnail($sUserId, $sImageUrl)
Definition: functions.inc.php:15
ChWsbFilesUploader\_GenSendFileInfoForm
_GenSendFileInfoForm( $iFileID, $aDefaultValues=array(), $aPossibleImage=array(), $aPossibleDuration=array())
Definition: ChWsbFilesUploader.php:669
$sType
$sType
Definition: actions.inc.php:11
$sFile
$sFile
Definition: index.php:20
createUserDataFile
createUserDataFile( $userID)
Definition: profiles.inc.php:192
ChWsbFilesUploader\$_iOwnerId
$_iOwnerId
Definition: ChWsbFilesUploader.php:14
getParam
getParam($sParamName, $bUseCache=true)
Definition: db.inc.php:130
$sModulesUrl
global $sModulesUrl
Definition: ChPhotosUploader.php:16
$sTitle
$sTitle
Definition: actions.inc.php:13
applyWatermark
applyWatermark( $srcFilename, $dstFilename, $wtrFilename, $wtrTransparency)
Definition: images.inc.php:58
ChPhotosUploader\_recordPhoto
_recordPhoto()
Definition: ChPhotosUploader.php:246
$sTags
$sTags
Definition: actions.inc.php:12
ChPhotosUploader\__construct
__construct()
Definition: ChPhotosUploader.php:27
ChPhotosUploader\servicePerformPhotoUpload
servicePerformPhotoUpload($sTmpFilename, $aFileInfo, $isUpdateThumb, $iAuthorId=0)
Definition: ChPhotosUploader.php:191
genRndPwd
genRndPwd($iLength=8, $bSpecialCharacters=true)
Definition: utils.inc.php:1618
ChWsbFilesUploader\alertAdd
alertAdd($iMedID, $bCheckPrivacy=false)
Definition: ChWsbFilesUploader.php:972
global
if(!defined("GLOBAL_MODULE")) define("GLOBAL_MODULE" global
Definition: header.inc.php:25
ChPhotosUploader\performPhotoUpload
performPhotoUpload($sTmpFile, $aFileInfo, $bAutoAssign2Profile=false, $isMoveUploadedFile=true, $iChangingPhotoID=0, $iAuthorId=0)
Definition: ChPhotosUploader.php:268
_t
_t($key, $arg0="", $arg1="", $arg2="")
Definition: languages.inc.php:509
getApplicationContent
getApplicationContent($sModule, $sApp, $aParamValues=array(), $bInline=false, $bEmbedCode=false, $sHtmlId="")
Definition: content.inc.php:166
time
that in the case of a Adaptation or at a minimum such credit will if a credit for all contributing authors of the Adaptation or Collection then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors For the avoidance of You may only use the credit required by this Section for the purpose of attribution in the manner set out above by exercising Your rights under this You may not implicitly or explicitly assert or imply any connection sponsorship or endorsement by the Original Licensor and or Attribution as of You or Your use of the without the express prior written permission of the Original Licensor and or Attribution Parties Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable if You Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or You must not modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author s honor or reputation Licensor agrees that in those in which any exercise of the right granted in modification or other derogatory action prejudicial to the Original Author s honor and the Licensor will waive or not as this to the fullest extent permitted by the applicable national to enable You to reasonably exercise Your right under Warranties and Disclaimer UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN LICENSOR OFFERS THE WORK AS IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE STATUTORY OR WITHOUT WARRANTIES OF FITNESS FOR A PARTICULAR OR THE ABSENCE OF LATENT OR OTHER OR THE PRESENCE OF ABSENCE OF WHETHER OR NOT DISCOVERABLE SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED SO SUCH EXCLUSION MAY NOT APPLY TO YOU Limitation on Liability EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES Termination This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License Individuals or entities who have received Adaptations or Collections from You under this will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses and will survive any termination of this License Subject to the above terms and the license granted here is Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time
Definition: license.txt:56
ChWsbFilesUploader\GenJquieryInjection
GenJquieryInjection()
Definition: ChWsbFilesUploader.php:331
ChPhotosUploader\getEmbedFormFile
getEmbedFormFile()
Definition: ChPhotosUploader.php:38
ChPhotosUploader\initFile
initFile($iMedID, $sTitle, $sCategories='', $sTags='', $sDesc='', $aCustom=array())
Definition: ChPhotosUploader.php:261
ChWsbFilesUploader\_getEmbedFormFile
_getEmbedFormFile()
Definition: ChWsbFilesUploader.php:216
$iFileId
$iFileId
Definition: embed.php:12
getProfileInfo
getProfileInfo($iProfileID=0, $checkActiveStatus=false, $forceCache=false)
Definition: profiles.inc.php:249
ChWsbFilesUploader\_getAuthorId
_getAuthorId()
Definition: ChWsbFilesUploader.php:102
ChPhotosUploader\GenSendFileInfoForm
GenSendFileInfoForm($iFileID, $aDefaultValues=array())
Definition: ChPhotosUploader.php:50
empty
Attr AllowedRel this is empty
Definition: Attr.AllowedRel.txt:7
imageResize
imageResize( $srcFilename, $dstFilename, $sizeX, $sizeY, $forceJPGOutput=false, $isSquare=false)
Definition: images.inc.php:29
ChWsbService\call
static call($mixed, $sMethod, $aParams=array(), $sClass='Module')
Definition: ChWsbService.php:32
$sDesc
$sDesc
Definition: actions.inc.php:21
as
as
Definition: Filter.ExtractStyleBlocks.Escaping.txt:10
ChWsbFilesUploader\_getAuthorPassword
_getAuthorPassword()
Definition: ChWsbFilesUploader.php:107
ChPhotosUploader\getUploadHtml5FileImageTransform
getUploadHtml5FileImageTransform()
Definition: ChPhotosUploader.php:237
$sStatus
$sStatus
Definition: actions.inc.php:11
$dir
$dir
Definition: config.php:10
ChPhotosUploader\performUpload
performUpload($sFilePath, $sRealFilename='', $aInfo=array(), $isMoveUploadedFile=true, $aExtraParams=array())
Definition: ChPhotosUploader.php:208