Skip to content

Instantly share code, notes, and snippets.

@modxws
modxws / csvfiletotable.php
Created May 29, 2014 06:15
Урок 28. csvfiletotable
<?php
function getArrayFromCsv($file,$delimiter) {
if (($handle = fopen($file, "r")) !== FALSE) {
$i = 0;
while (($lineArray = fgetcsv($handle, 4000, $delimiter)) !== FALSE) {
for ($j=0; $j<count($lineArray); $j++) {
$data2DArray[$i][$j] = $lineArray[$j];
}
$i++;
}
@modxws
modxws / csvtotable.php
Created May 29, 2014 06:19
Урок 28. csvtotable
<?php
$a = explode("\n", $input);
foreach ($a as $key => $line)
{
$a[$key] = explode(",", $line);
};
foreach ($a as $element)
{ $output .="
<tr>
@modxws
modxws / modxws-74-2.html
Last active August 29, 2015 14:04
modxws-74-2
<a href="[[~[[+id]]]]">[[+pagetitle]]</a></li>
@modxws
modxws / modxws-74-7.html
Created July 20, 2014 08:01
modxws-74-7
<li class="[[+rowCls]]"><a href="[[~[[+id]]]]">[[+pagetitle]]</a></li>
@modxws
modxws / polymer-tuts-1.xml
Created November 4, 2014 11:11
polymer-tuts-1
<body unresolved fullbleed>
<core-scaffold id="scaffold">
<nav>Left drawer</nav>
<core-toolbar tool>Application</core-toolbar>
<div>Main content</div>
</core-scaffold>
</body>
@modxws
modxws / modxws-urok16-8.html
Created November 28, 2014 14:11
HTML: modxws-urok16-8
<a href='#' class='close_overlay'></a>
<a href='#' class='photo_left'></a>
<a href='#' class='photo_right'></a>
<h2 class='gallery_title'></h2>
<div class='gallery_image'>
<div class='loading_image'>
<div class='circle'></div>
<div class='circle1'></div>
</div>
</div>
@modxws
modxws / modxws-urok4-3.html
Created June 19, 2012 11:24
HTML: modxws-urok4-3
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=[[++modx_charset]]" />
<base href="http://modx.ws/" />
<title>[[++site_name]]</title>
@modxws
modxws / modxws-urok4-4.html
Last active October 6, 2015 06:48
HTML: modxws-urok4-4
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=[[++modx_charset]]" />
<base href="[[++site_url]]" />
<title>[[++site_name]]</title>
@modxws
modxws / modxws-urok4-1.html
Created June 19, 2012 11:08
HTML: modxws-urok4-1
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Business Success</title>
@modxws
modxws / modxws-urok4-2.html
Created June 19, 2012 11:18
HTML: modxws-urok4-2
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=[[++modx_charset]]" />
<title>[[++site_name]]</title>