Ejemplo n.º 1
0
 function toHtml()
 {
     $v = $this->getAttribute('value');
     if (!empty($v) && $this->getAttribute('showimage')) {
         $img = '<img src="' . $this->_imagepath . $v . '" /><br />';
     } else {
         $img = '';
     }
     return $img . parent::toHtml();
 }
Ejemplo n.º 2
0
    function toHtml()
    {
        $field =& $this->getFieldDef();
        $ID = 'temp' . rand(1, 1000000);
        //$_REQUEST['ID'];//get current user's ID whose video will be recorded
        if ($this->record and $this->record->getValue('id')) {
            $ID = $this->record->getValue('id');
        }
        $value = $ID;
        //get ray directory
        $ray_dir = "http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']);
        if ($ray_dir[strlen($ray_dir) - 1] != '/') {
            $ray_dir .= '/';
        }
        $ray_xml = $ray_dir . "get_xml.php";
        $out = <<<END
   
<div class="help">If you have a web camera you can press the <em>Record</em> button below to record your piece. <a href="troubleshooting.php">Troubleshooting instructions</a>.</div> 
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="348" height="248" id="ray_recorder" align="middle">
<param name="allowScriptAccess" value="always" />
<param name="movie" value="{$ray_dir}ray_recorder.swf" />
<param name="quality" value="high" />
<param name="wmode" value="TRANSPARENT" />
<param name="FlashVars" value="ID={$ID}&url={$ray_xml}" />
<embed
        src="{$ray_dir}ray_recorder.swf"
        WMODE="TRANSPARENT"
        quality="high"
        bgcolor="#ffffff"
        width="348" height="248"
        name="ray_recorder"
        align="middle"
        allowScriptAccess="always"
        type="application/x-shockwave-flash"
        FlashVars="ID={$ID}&url={$ray_xml}"
        pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object><br/>
<div class="help">Or upload a movie file from your camera, phone, or computer...</div>
<input name="{$this->getName()}__webcam__" type="hidden" value="{$value}" />
END;
        return $out . parent::toHtml();
    }