Пример #1
0
                }
                if (file_exists($file = SERVERPATH . '/' . ZENFOLDER . '/gd_fonts/' . $font . '.gdf')) {
                    return imageloadfont($file);
                }
            }
            return 5;
            // default to the largest inbuilt font
        }
        /**
         * Returns the font width in pixels
         *
         * @param int $font
         * @return int
         */
        function zp_imageFontWidth($font)
        {
            return imagefontwidth($font);
        }
        /**
         * Returns the font height in pixels
         *
         * @param int $font
         * @return int
         */
        function zp_imageFontHeight($font)
        {
            return imagefontheight($font);
        }
        require_once PHPScript('5.1.0', '_functions_GD.php');
    }
}
Пример #2
0
        } else {
            die('setup scripts missing');
        }
    }
}
/**
 *
 * Produces the # to table association array
 */
function getTableAsoc()
{
    return array('1' => 'albums', '2' => 'images', '3' => 'news', '4' => 'pages', '5' => 'comments');
}
/**
 *
 * Returns a Zenphoto tiny URL to the object
 * @param $obj object
 */
function getTinyURL($obj)
{
    $asoc = array_flip(getTableAsoc());
    $tiny = $obj->getID() << 3 | $asoc[$obj->table];
    if (MOD_REWRITE) {
        return FULLWEBPATH . '/tiny/' . $tiny;
    } else {
        return FULLWEBPATH . '/index.php?p=' . $tiny . '&t';
    }
}
//load PHP specific functions
require_once PHPScript('5.0.0', '_functions.php');
setexifvars();