function get_logo() { return strpos($this->logo, ".svg") !== FALSE ? load_svg("logos/" . $this->logo) : "<img src='/images/logos/" . $this->logo . "'>"; }
<label for="email">Email Address:</label> <input id="email" name="email" type="email"> </div> <div class="form-row"> <label for="subject">Subject:</label> <input id="subject" name="subject"> </div> <div class="form-row"> <label for="body">Body:</label> <textarea id="body" name="body" rows=10></textarea> </div> <p class="confirm"> <span>Send<span class="contact-icon"><?php echo load_svg("/icons/mail.svg"); ?> </span><span class="contact-email"> to jacob@jacoblmacdonald.com</span> </p> </form> <p class="confirm mobile"> <br><span>Send<span class="contact-icon"><?php echo load_svg("/icons/mail.svg"); ?> </span>to<br><span class="contact-email">jacob@jacoblmacdonald.com</span> <br><br><a href="http://github.com/jacoblmacdonald" target="_blank">Or visit my Github <span class="github-icon"><?php echo load_svg("github_logo.svg"); ?> </span></a> </p> <div id="email-form-success"> <p>Thank you! I'll be in touch.</p> </div>
function paintr() { global $current_id; /* try {*/ load_current_id(STORE_DIR); $current_id++; //$filename_jpeg = WORK_DIR . $current_id . ".jpg"; $filename_svg = WORK_DIR . $current_id . ".svg"; $filename_svg_final = STORE_DIR . $current_id . ".svg"; $filename_html = STORE_DIR . $current_id . ".html"; echo "Begin.<br />"; echo "ID: " . $current_id . "<br />"; echo "Get palette.<br />"; $palette_source = get_palette(); $palette_name = palette_name($palette_source); $palette = palette_entries($palette_source); $palette = sort_palette_by_brightness($palette); $palette = light_to_dark_or_dark_to_light($palette); $palette_tags = palette_tags($palette_source); echo "Tags: " . implode(", ", $palette_tags) . "<br />\n"; //$wordnet_synonims = wordnet_tags_synonims ($palette_tags); //echo implode (", ", $wordnet_synonims) . "\n"; // At the moment flickr API access fails if we don't echo these. Huh? echo "Get photo.<br />"; $photo = photo_from_tags($palette_tags); //($wordnet_synonims); echo "Get photo user name.<br />"; $username = photo_user_name($photo); echo "Get photo name.<br/>"; $photo_name = photo_name($photo); $file_description = $photoname . ' by ' . $username . ', licensed under the Creative Commons Attribution-ShareAlike License' . '.jpg'; $filename_jpeg = WORK_DIR . urlencode($file_description); echo "Save JPEG.<br />"; photo_save_jpeg($photo, $filename_jpeg); echo "Autotrace.<br />"; autotrace(count($palette), $filename_jpeg, $filename_svg); echo "Delete old file.<br />"; @unlink($filename_jpeg); echo "Load svg.<br />"; $svg = load_svg($filename_svg); echo "Apply palette.<br />"; $svg = apply_palette_to_svg($palette, $svg); echo "Save SVG.<br />"; save_svg($svg, $filename_svg_final); echo "Save writeup.<br />"; save_writeup($filename_html, $palette_name, $palette, $palette_tags, $photo); echo "End.<br />"; /* } catch (Exception $e) { $error = "<h2>" . date ("l dS of F Y at h:i:s A") . "</h2>" . "<h2>An error occurred: " . get_class($e) . "</h2>\n" . "<h3>{$e->getMessage()} ({$e->getCode()})</h3>\n\n" . "file: {$e->getFile()}<br/>\n" . "line: {$e->getLine()}<br/>\n" . "<PRE>" . $e->getTraceAsString() . "</PRE><br />" ; file_put_contents ("./error.html", $error, FILE_APPEND); die (); }*/ // When finished, save the id for next time. If we failed, re-use same id. save_current_id(STORE_DIR); trim_older(); }