Exemplo n.º 1
0
 function get_feature_code()
 {
     @exec("systeminfo", $array);
     for ($i = 1; $i <= 10; $i++) {
         $new[$i] = auto_charset($array[$i], 'gb2312', 'utf-8');
     }
     $new1 = explode(":", $new[1]);
     $new9 = explode(":", $new[9]);
     $new10 = explode(":", $new[10]);
     $str = $new1[1] . "|" . $new9[1] . "|" . $new10[1];
     $str = str_replace(" ", "", $str);
     $v1 = f_encode($str);
     $T_k1 = "cdrGDaNiVKRAwoOQgPEWsejkLnHxzShFuJCBXpltfImTUYMbqvyZ";
     $T_k2 = "EekCZmLfJblTtiMyDVFRSHnBzXwrKdNgGvcpqhUaosYQAOWjuIPx";
     $c = strtr($v1, $T_k1, $T_k2);
     return $c;
 }
" filename="<?php 
                echo $file["name"];
                ?>
">
						<div class="loading"></div>
						<div class="data">
							<span class="del text-center"><a class="link del">删除</a> </span>
							<span class="size" ><?php 
                echo reunit($file["size"]);
                ?>
</span>
							<span class="auto autocut" title="<?php 
                echo $file["name"];
                ?>
"> <a target="_blank" href="<?php 
                echo U('down?attach_id=' . f_encode($file['id']));
                ?>
"><?php 
                echo $file["name"];
                ?>
</a>
								</span>
						</div>
					</li><?php 
            }
        }
    } else {
        echo "";
    }
}
?>
Exemplo n.º 3
0
function show_file($add_file)
{
    $files = array_filter(explode(';', $add_file));
    foreach ($files as $file) {
        if (strlen($file) > 1) {
            $model = M("File");
            $where['sid'] = array('eq', $file);
            $File = $model->where($where)->field("name,size,extension")->find();
            echo '<div class="attach_file" style="background-image:url(__PUBLIC__/ico/ico_' . strtolower($File['extension']) . '.jpg); background-repeat:no-repeat;"><a target="_blank" href="__URL__/down/attach_id/' . f_encode($file) . '">' . $File['name'] . ' (' . reunit($File['size']) . ')' . '</a>';
            echo '</div>';
        }
    }
}
Exemplo n.º 4
0
function showFile($add_file, $mode)
{
    $files = explode(';', $add_file);
    if (count($files) > 1) {
        foreach ($files as $file) {
            if (strlen($file) > 1) {
                $fileId = f_decode($file);
                $fileId = $file;
                $model = M("File");
                $File = $model->where("id={$fileId}")->field("name,size,extension")->find();
                echo '<div class="attach_file" style="background-image:url(__PUBLIC__/images/ico/ico_' . strtolower($File['extension']) . '.jpg); background-repeat:no-repeat;"><a target="_blank" href="__URL__/down/attach_id/' . f_encode($file) . '">' . $File['name'] . ' (' . reunit($File['size']) . ')' . '</a>';
                if ($mode == "edit") {
                    echo '<a href="#" class="prgCancel" id="' . $file . '">删除</a>';
                }
                echo '</div>';
            }
        }
    }
}