Cheetah
functions.inc.php
Go to the documentation of this file.
1 <?php
2 
8 function removeFiles($sId)
9 {
11  @unlink($sFilesPath . $sId . IMAGE_EXTENSION);
12  @unlink($sFilesPath . $sId . THUMB_FILE_NAME . IMAGE_EXTENSION);
13 }
14 
15 function photo_getEmbedThumbnail($sUserId, $sImageUrl)
16 {
20 
21  $sFilePath = $sFilesPath . $sUserId . IMAGE_EXTENSION;
22  @copy($sImageUrl, $sFilePath);
23  @chmod($sFilePath, 0666);
24  $sCommand = $sFfmpegPath . " -y -i " . $sFilePath . " -ss 0 -vframes 1 -an -f image2 " . $sFilePath;
25  @popen($sCommand, "r");
26  if(file_exists($sFilePath) && filesize($sFilePath) > 0)
27  return photo_getRecordThumbnail($sUserId);
28  else
29  return false;
30 }
31 
32 function photo_getRecordThumbnail($sUserId)
33 {
37 
38  $sFileName = $sUserId . THUMB_FILE_NAME . IMAGE_EXTENSION;
39  @unlink($sFilesPath . $sFileName);
40  $sCommand = $sFfmpegPath . " -y -i " . $sFilesPath . $sUserId . IMAGE_EXTENSION . " -s 64x64 -ss 0 -vframes 1 -an -f image2 " . $sFilesPath . $sFileName;
41  @popen($sCommand, "r");
42  if(file_exists($sFilesPath . $sFileName))
43  return $sFilesUrl . $sFileName;
44  else
45  return false;
46 }
$sFilesUrl
$sFilesUrl
Definition: header.inc.php:11
php
photo_getRecordThumbnail
photo_getRecordThumbnail($sUserId)
Definition: functions.inc.php:32
removeFiles
removeFiles($sId)
Definition: functions.inc.php:8
copy
and that you are informed that you can do these things To protect your we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it For if you distribute copies of the whether gratis or for a you must give the recipients all the rights that we gave you You must make sure that receive or can get the source code If you link other code with the you must provide complete object files to the so that they can relink them with the library after making changes to the library and recompiling it And you must show them these terms so they know their rights We protect your rights with a two step which gives you legal permission to copy
Definition: license.txt:50
photo_getEmbedThumbnail
photo_getEmbedThumbnail($sUserId, $sImageUrl)
Definition: functions.inc.php:15
global
if(!defined("GLOBAL_MODULE")) define("GLOBAL_MODULE" global
Definition: header.inc.php:25
$sFfmpegPath
$sFfmpegPath
Definition: header.inc.php:60
$sId
$sId
Definition: actions.inc.php:8
$sFilesPath
$sFilesPath
Definition: header.inc.php:10