?> </table> </div> </div> <div class="postbox closed"> <h3 class="postbox-handle"><span><?php _e('Maintenance', 'PhotoQ'); ?> </span></h3> <div class="inside"> <table width="100%" cellspacing="2" cellpadding="5" class="form-table"> <?php if (!PhotoQHelper::isWPMU()) { ?> <tr valign="top"> <th scope="row"><?php _e('Upgrade:', 'PhotoQ'); ?> </th> <td><input style="vertical-align: top;" type="submit" class="button-secondary" name="showUpgradePanel" value="<?php _e('Upgrade from PhotoQ < 1.5', 'PhotoQ'); ?> »" /></td> </tr> <tr valign="top"> <th scope="row"><?php
/** * Are we currently doing an ftp upload? * @return boolean */ function _isFtpUpload() { return !PhotoQHelper::isWPMU() && isset($_POST['ftp_upload']); }
<input type="file" class="button-secondary" name="Filedata" id="Filedata" /> <input type="submit" class="button-secondary action" value="Upload"/> <input type="hidden" name="batch_upload" value="0"> <?php } ?> </div> <div class="alignleft actions"> <input type="button" id="cancelbtn" class="button-secondary action" onclick="cancelUpload()" value="<?php _e('Cancel', 'PhotoQ'); ?> " /> </div> <div class="alignright actions"> <?php if (!PhotoQHelper::isWPMU() && $this->_oc->getValue('enableFtpUploads')) { ?> <input type="submit" id="ftpUploadBtn" name="ftp_upload" class="button-secondary action" value="<?php _e('Import from FTP directory...', 'PhotoQ'); ?> " /> <?php } ?> </div> </div> </form> <div id="SWFUploadFileListingFiles"></div> <br class="clr" />
function getImgDir() { if (PhotoQHelper::isWPMU()) { return BLOGUPLOADDIR; } else { // if path is relative, assumes relative to ABSPATH -> ABSPATH added // if path is absolute, returned as is $dir = path_join(ABSPATH, trim($this->getValue('imgdir'))); //prepend ABSPATH to $imgdir if it is not already there //$dirPath = str_replace(ABSPATH, '', trim($this->getValue('imgdir'))); //$dir = rtrim(ABSPATH . $dirPath, '/'); return str_replace('\\', '/', $dir) . '/'; } }