Ejemplo n.º 1
0
&file=<?php 
                    echo $current_path . $rfm_subfolder . $subdir . $file;
                    ?>
"
						href="docs.google.com;" ><i class=" icon-eye-open"></i></a>	    
						
				    <?php 
                } else {
                    ?>
				    <a style="display:none;" class="preview disabled"><i class="icon-eye-open icon-white"></i></a>
				    <?php 
                }
                ?>
				    <?php 
                $fid = $fm->getFidByPath($current_path . $rfm_subfolder . $subdir . $file);
                $starFlag = $fm->isFileStard($fid['fid'], $_SESSION['uuid']);
                ?>
				    <a href="javascript:void('')" id="<?php 
                echo $fid['fid'];
                ?>
" onclick="starFile(this,'<?php 
                if ($starFlag) {
                    echo '取消标星';
                } else {
                    echo '标星';
                }
                ?>
')" class="tip-left star-button star-file" title="<?php 
                if ($starFlag) {
                    echo '取消标星';
                } else {
Ejemplo n.º 2
0
                         duplicate_file($base_dir . $fixed_image_creation_name_to_prepend[$k] . $info['filename'] . $fixed_image_creation_to_append[$k] . "." . $info['extension'], $fixed_image_creation_name_to_prepend[$k] . $name . $fixed_image_creation_to_append[$k]);
                     }
                 }
             }
         } else {
             die(lang_Empty_name);
         }
     }
     break;
 case 'star_file':
     $path_thumb = $_POST['path_thumb'];
     $pdo = new PDO("mysql:dbname={$dbname};host={$host}", $user, $password);
     $user = new userMgr($pdo);
     $fm = new fileMgr($pdo);
     $fid = $fm->getFidByPath($path);
     if (!$fm->isFileStard($fid['fid'], $_SESSION['uuid'])) {
         if ($a = $fm->star($_SESSION['uuid'], $fid['fid'])) {
             echo '标星成功';
         } else {
             echo '标星失败';
         }
     } else {
         $st = $fm->getStarsByUid($_SESSION['uuid']);
         $realkey = 0;
         foreach ($st as $key => $value) {
             if ($value->getFid() == $fid['fid']) {
                 $realkey = $key;
                 break;
             }
         }
         if ($fm->deleteStars($st[$realkey]->getStid(), $_SESSION['uuid'])) {